summaryrefslogtreecommitdiffstats
path: root/hugolib/content_map_page.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r--hugolib/content_map_page.go7
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 := &sectionWalker{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) {