commit d064139cee17959f02fadce3cae97e2238abcb15
parent 16330cea91485158155f0bb07caf66639e00c9d2
Author: Jian Zhou <i@janzhou.org>
Date: Wed, 8 Oct 2014 16:02:53 -0400
Fix spf13/hugo#467. RSSLink now point to index.xml
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/helpers/url.go b/helpers/url.go
@@ -84,6 +84,9 @@ func UrlPrep(ugly bool, in string) string {
return x
} else {
x := PrettifyUrl(SanitizeUrl(in))
+ if path.Ext(x) == ".xml" {
+ return x
+ }
url, err := purell.NormalizeURLString(x, purell.FlagAddTrailingSlash)
if err != nil {
return in