Fix /.xml RSSLink when uglyurls are enabled

Prior to this commit the root url with uglyurls enabled is "/.xml".
This commit relates to #175.
This commit is contained in:
John McFarlane 2015-12-06 21:34:09 -08:00 committed by Steve Francia
parent ff28120e53
commit b1f2b433bc
1 changed files with 4 additions and 0 deletions

View File

@ -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)
}