hugolib: Restore taxonomy term path separation

Fixes #5513
This commit is contained in:
Bjørn Erik Pedersen
2018-12-13 11:52:26 +01:00
parent ab9214768d
commit 9ce0a1fb70
6 changed files with 88 additions and 14 deletions

View File

@@ -1774,8 +1774,8 @@ func (p *Page) prepareData(s *Site) error {
case KindHome:
pages = s.RegularPages
case KindTaxonomy:
plural := p.sections[0]
term := p.sections[1]
plural := path.Join(p.sections[:len(p.sections)-1]...)
term := p.sections[len(p.sections)-1]
if s.Info.preserveTaxonomyNames {
if v, ok := s.taxonomiesOrigKey[fmt.Sprintf("%s-%s", plural, term)]; ok {
@@ -1792,7 +1792,7 @@ func (p *Page) prepareData(s *Site) error {
p.data["Term"] = term
pages = taxonomy.Pages()
case KindTaxonomyTerm:
plural := p.sections[0]
plural := path.Join(p.sections...)
singular := s.taxonomiesPluralSingular[plural]
p.data["Singular"] = singular