diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-09 10:05:22 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-10 20:07:42 +0200 |
commit | bd98182dbde893a8a809661c70633741bbf63911 (patch) | |
tree | b6291cffa6c2e573a0976a0d70aa467c7a101012 /hugolib/site.go | |
parent | e88d7989907108b656eccd92bccc076be72a5c03 (diff) |
Implement cascading front matter
Fixes #6041
Diffstat (limited to 'hugolib/site.go')
-rw-r--r-- | hugolib/site.go | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/hugolib/site.go b/hugolib/site.go index 2b8a7285a..bf07d52b1 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1650,12 +1650,13 @@ func (s *Site) kindFromSectionPath(sectionPath string) string { } func (s *Site) newTaxonomyPage(title string, sections ...string) *pageState { - p, err := newPageFromMeta(&pageMeta{ - title: title, - s: s, - kind: page.KindTaxonomy, - sections: sections, - }) + p, err := newPageFromMeta( + map[string]interface{}{"title": title}, + &pageMeta{ + s: s, + kind: page.KindTaxonomy, + sections: sections, + }) if err != nil { panic(err) @@ -1666,11 +1667,13 @@ func (s *Site) newTaxonomyPage(title string, sections ...string) *pageState { } func (s *Site) newPage(kind string, sections ...string) *pageState { - p, err := newPageFromMeta(&pageMeta{ - s: s, - kind: kind, - sections: sections, - }) + p, err := newPageFromMeta( + map[string]interface{}{}, + &pageMeta{ + s: s, + kind: kind, + sections: sections, + }) if err != nil { panic(err) |