summaryrefslogtreecommitdiffstats
path: root/helpers/url.go
diff options
context:
space:
mode:
authorJohn McFarlane <john@rockfloat.com>2015-12-06 21:34:09 -0800
committerSteve Francia <steve.francia@gmail.com>2016-01-04 11:25:37 -0500
commitb1f2b433bc4ec520df81c04493e8e1634293c8e7 (patch)
tree8575fcbb42818c0ec08e34f84a92b5bba4cff788 /helpers/url.go
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/url.go')
-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)
}