shithub: hugo

Download patch

ref: 18d69d7f8c0b7a0694e649ce2da91ab1063c7c88
parent: c1a2b7a102f314faf1322d7249ec198a0bcb1a62
author: Ryan Clarke <[email protected]>
date: Mon Jun 1 16:29:29 EDT 2015

Fix periods in taxonomies create bad paths
Fixes #1188

--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -1095,7 +1095,14 @@
 
 		n, base = s.newTaxonomyNode(t)
 
-		if err := s.renderAndWritePage("taxonomy "+t.singular, base, n, layouts...); err != nil {
+		dest := base
+		if viper.GetBool("UglyURLs") {
+			dest = helpers.Uglify(base + ".html")
+		} else {
+			dest = helpers.PrettifyPath(base + "/index.html")
+		}
+
+		if err := s.renderAndWritePage("taxonomy "+t.singular, dest, n, layouts...); err != nil {
 			results <- err
 			continue
 		}