diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-05-17 18:45:23 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-05-17 22:13:29 +0200 |
commit | 8a69ccbb00e7978c6c5d57e353ce178c2b732b07 (patch) | |
tree | b2f4a1438ae504555571b3e71a205c9022ec68b2 /hugolib/content_map_page.go | |
parent | 7ce033a89d411036e40dbb42325e30e12248bda9 (diff) | |
download | hugo-8a69ccbb00e7978c6c5d57e353ce178c2b732b07.tar.gz hugo-8a69ccbb00e7978c6c5d57e353ce178c2b732b07.zip |
commands: Improve the common build flag handling
Updates #10947
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r-- | hugolib/content_map_page.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index 1b6fd40e9..6f02e2e29 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -743,9 +743,12 @@ func (m *pageMaps) AssemblePages() error { sw := §ionWalker{m: pm.contentMap} a := sw.applyAggregates() - if a.mainSection != "" && len(pm.s.s.conf.C.MainSections) == 0 { + if a.mainSection != "" { + // Note, sites that have no custom config share a common config struct pointer. + // This means that we currently do not support setting different values per language. + // The end user can, however, configure this per language if needed. mainSections := []string{strings.TrimRight(a.mainSection, "/")} - pm.s.s.conf.C.SetMainSections(mainSections) + pm.s.s.conf.C.SetMainSectionsIfNotSet(mainSections) } pm.s.lastmod = a.datesAll.Lastmod() if resource.IsZeroDates(pm.s.home) { |