Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rw-r--r--helpers/url.go4
1 files changed, 4 insertions, 0 deletions
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)
}