From b1f2b433bc4ec520df81c04493e8e1634293c8e7 Mon Sep 17 00:00:00 2001 From: John McFarlane Date: Sun, 6 Dec 2015 21:34:09 -0800 Subject: [PATCH] Fix /.xml RSSLink when uglyurls are enabled Prior to this commit the root url with uglyurls enabled is "/.xml". This commit relates to #175. --- helpers/url.go | 4 ++++ 1 file changed, 4 insertions(+) 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) }