diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 1a7bdf901..f35c7ce06 100644 --- 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 index 3c6dc2707..5687cc032 100644 --- 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") + }