mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Make sure that empty terms lists are still created
Fixes #2977
This commit is contained in:
parent
3669015f56
commit
9671162a22
2 changed files with 11 additions and 7 deletions
|
@ -351,14 +351,14 @@ func (h *HugoSites) createMissingPages() error {
|
||||||
newPages = append(newPages, n)
|
newPages = append(newPages, n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if s.isEnabled(KindTaxonomyTerm) {
|
if s.isEnabled(KindTaxonomyTerm) {
|
||||||
if !foundTaxonomyTermsPage {
|
if !foundTaxonomyTermsPage {
|
||||||
foundTaxonomyTermsPage = true
|
foundTaxonomyTermsPage = true
|
||||||
n := s.newTaxonomyTermsPage(plural)
|
n := s.newTaxonomyTermsPage(plural)
|
||||||
s.Pages = append(s.Pages, n)
|
s.Pages = append(s.Pages, n)
|
||||||
newPages = append(newPages, n)
|
newPages = append(newPages, n)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ defaultContentLanguage = "en"
|
||||||
tag = "tags"
|
tag = "tags"
|
||||||
category = "categories"
|
category = "categories"
|
||||||
other = "others"
|
other = "others"
|
||||||
|
empty = "empties"
|
||||||
`
|
`
|
||||||
|
|
||||||
pageTemplate := `---
|
pageTemplate := `---
|
||||||
|
@ -141,4 +142,7 @@ others:
|
||||||
require.Equal(t, "Hello Hugo World", helloWorld.Title)
|
require.Equal(t, "Hello Hugo World", helloWorld.Title)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Issue #2977
|
||||||
|
th.assertFileContent("public/empties/index.html", "Terms List", "Empties")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue