hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 18d69d7f8c0b7a0694e649ce2da91ab1063c7c88
parent c1a2b7a102f314faf1322d7249ec198a0bcb1a62
Author: Ryan Clarke <ryan@ryanclarke.net>
Date:   Mon,  1 Jun 2015 20:29:29 -0400

Fix periods in taxonomies create bad paths
Fixes #1188

Diffstat:
Mhugolib/site.go | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hugolib/site.go b/hugolib/site.go
@@ -1095,7 +1095,14 @@ func taxonomyRenderer(s *Site, taxes <-chan taxRenderInfo, results chan<- error,
 
 		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
 		}