diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-12-13 11:52:26 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-12-14 10:29:32 +0100 |
commit | 9ce0a1fb7011bd75eb0e2262e35354c49ce98ac5 (patch) | |
tree | c3ff6ae598ec5dcf022c05b8b076e93922caafb3 /hugolib/page.go | |
parent | ab9214768de4ce10032d3fe7ec8c7b2932ead892 (diff) |
hugolib: Restore taxonomy term path separation
Fixes #5513
Diffstat (limited to 'hugolib/page.go')
-rw-r--r-- | hugolib/page.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index 15ed631c1..e5da74641 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -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 |