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 gohugoio#175.
  • Loading branch information
jmcfarlane committed Dec 7, 2015
1 parent 50b5d0a commit 78894b6
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 78894b6

Please sign in to comment.