Skip to content

Commit

Permalink
Fix /.xml RSSLink when uglyurls are enabled
Browse files Browse the repository at this point in the history
Prior to this commit the root url with uglyurls enabled is "/.xml".
This commit relates to #175.
  • Loading branch information
jmcfarlane authored and spf13 committed Jan 4, 2016
1 parent ff28120 commit b1f2b43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helpers/url.go
Expand Up @@ -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)
}

0 comments on commit b1f2b43

Please sign in to comment.