summaryrefslogtreecommitdiffstats
path: root/hugolib/content_map.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-18 16:16:09 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-18 16:43:36 +0100
commit1b7acfe7634a5d7bbc597ef4dddf4babce5666c5 (patch)
treee8f3cd72148661c050afda184a9a98f4eaa3dc5a /hugolib/content_map.go
parent19e12caf8c90516e3b803ae8a40b907bd89dc96c (diff)
Fix taxonomy
Recently introduced in master. See https://github.com/gohugoio/hugo/issues/6897#issuecomment-587499907
Diffstat (limited to 'hugolib/content_map.go')
-rw-r--r--hugolib/content_map.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hugolib/content_map.go b/hugolib/content_map.go
index f0b66d859..279c8e43a 100644
--- a/hugolib/content_map.go
+++ b/hugolib/content_map.go
@@ -533,6 +533,7 @@ func (m *contentMap) getPage(section, name string) *contentNode {
func (m *contentMap) getSection(s string) (string, *contentNode) {
k, v, found := m.sections.LongestPrefix(path.Dir(s))
+
if found {
return k, v.(*contentNode)
}
@@ -919,6 +920,9 @@ func (c *contentTreeRef) isSection() bool {
}
func (c *contentTreeRef) getSection() (string, *contentNode) {
+ if c.t == c.m.taxonomies {
+ return c.m.getTaxonomyParent(c.key)
+ }
return c.m.getSection(c.key)
}