hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit 9671162a22bd1e501fb0a7f033cfad254225dbcb
parent 3669015f5667f49e6161768c9fd2631c553d5045
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed,  1 Mar 2017 17:07:38 +0100

hugolib: Make sure that empty terms lists are still created

Fixes #2977

Diffstat:
Mhugolib/hugo_sites.go | 14+++++++-------
Mhugolib/taxonomy_test.go | 4++++
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
@@ -351,14 +351,14 @@ func (h *HugoSites) createMissingPages() error {
 							newPages = append(newPages, n)
 						}
 					}
+				}
 
-					if s.isEnabled(KindTaxonomyTerm) {
-						if !foundTaxonomyTermsPage {
-							foundTaxonomyTermsPage = true
-							n := s.newTaxonomyTermsPage(plural)
-							s.Pages = append(s.Pages, n)
-							newPages = append(newPages, n)
-						}
+				if s.isEnabled(KindTaxonomyTerm) {
+					if !foundTaxonomyTermsPage {
+						foundTaxonomyTermsPage = true
+						n := s.newTaxonomyTermsPage(plural)
+						s.Pages = append(s.Pages, n)
+						newPages = append(newPages, n)
 					}
 				}
 			}
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
@@ -73,6 +73,7 @@ defaultContentLanguage = "en"
 tag = "tags"
 category = "categories"
 other = "others"
+empty = "empties"
 `
 
 	pageTemplate := `---
@@ -141,4 +142,7 @@ others:
 		require.Equal(t, "Hello Hugo World", helloWorld.Title)
 	}
 
+	// Issue #2977
+	th.assertFileContent("public/empties/index.html", "Terms List", "Empties")
+
 }