Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McFarlane <john@rockfloat.com>2015-12-07 08:34:09 +0300
committerSteve Francia <steve.francia@gmail.com>2016-01-04 19:25:37 +0300
commitb1f2b433bc4ec520df81c04493e8e1634293c8e7 (patch)
tree8575fcbb42818c0ec08e34f84a92b5bba4cff788 /helpers
parentff28120e53c7d3d5fce9941082f72eb89adb43b7 (diff)
Fix /.xml RSSLink when uglyurls are enabled
Prior to this commit the root url with uglyurls enabled is "/.xml". This commit relates to #175.
Diffstat (limited to 'helpers')
-rw-r--r--helpers/url.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/helpers/url.go b/helpers/url.go
index 007d699b3..bebcb8663 100644
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -269,6 +269,10 @@ func Uglify(in string) string {
}
return in
}
+ // /.xml -> /index.xml
+ if name == "" {
+ return path.Dir(in) + "index" + ext
+ }
// /section/name.html -> /section/name.html
return path.Clean(in)
}