hugolib: Fix preserveTaxonomyNames regression

Fixes #3070
This commit is contained in:
Bjørn Erik Pedersen
2017-02-23 10:03:48 +01:00
parent 831bfd36aa
commit c1425a166d
3 changed files with 31 additions and 7 deletions

View File

@@ -326,6 +326,8 @@ func (h *HugoSites) createMissingPages() error {
foundTaxonomyTermsPage := false
for key := range tax {
foundTaxonomyPage := false
origKey := key
if s.Info.preserveTaxonomyNames {
key = s.PathSpec.MakePathSanitized(key)
}
@@ -344,7 +346,7 @@ func (h *HugoSites) createMissingPages() error {
if s.isEnabled(KindTaxonomy) {
if !foundTaxonomyPage {
n := s.newTaxonomyPage(plural, key)
n := s.newTaxonomyPage(plural, origKey)
s.Pages = append(s.Pages, n)
newPages = append(newPages, n)
}