Implement cascading front matter

Fixes #6041
This commit is contained in:
Bjørn Erik Pedersen
2019-08-09 10:05:22 +02:00
parent e88d798990
commit bd98182dbd
11 changed files with 496 additions and 73 deletions

View File

@@ -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)