hugolib: Fix preserveTaxonomyNames regressions

Fixes #2809
This commit is contained in:
Bjørn Erik Pedersen
2016-12-26 19:30:57 +01:00
parent 862f09babe
commit bcb3ef7413
4 changed files with 36 additions and 4 deletions

View File

@@ -225,6 +225,9 @@ func (h *HugoSites) createMissingPages() error {
foundTaxonomyPage := false
foundTaxonomyTermsPage := false
for key := range tax {
if s.Info.preserveTaxonomyNames {
key = s.Info.pathSpec.MakePathSanitized(key)
}
for _, p := range taxonomyPages {
if p.sections[0] == plural && p.sections[1] == key {
foundTaxonomyPage = true