diff options
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r-- | hugolib/content_map_page.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index 70c5d6a27..1b6fd40e9 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -148,7 +148,7 @@ func (m *pageMap) newPageFromContentNode(n *contentNode, parentBucket *pagesMapB parseResult, err := pageparser.Parse( r, - pageparser.Config{EnableEmoji: s.siteCfg.enableEmoji}, + pageparser.Config{EnableEmoji: s.conf.EnableEmoji}, ) if err != nil { return nil, err @@ -742,13 +742,11 @@ func (m *pageMaps) AssemblePages() error { sw := §ionWalker{m: pm.contentMap} a := sw.applyAggregates() - _, mainSectionsSet := pm.s.s.Info.Params()["mainsections"] - if !mainSectionsSet && a.mainSection != "" { + + if a.mainSection != "" && len(pm.s.s.conf.C.MainSections) == 0 { mainSections := []string{strings.TrimRight(a.mainSection, "/")} - pm.s.s.Info.Params()["mainSections"] = mainSections - pm.s.s.Info.Params()["mainsections"] = mainSections + pm.s.s.conf.C.SetMainSections(mainSections) } - pm.s.lastmod = a.datesAll.Lastmod() if resource.IsZeroDates(pm.s.home) { pm.s.home.m.Dates = a.datesAll |