aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/content_map_page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-03 12:08:00 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-03 15:07:59 +0100
commita66480f70c1ac734ba5af035e626d29ffcde157d (patch)
treee14fdf9a405e5d92ce6e78633a87569a7d979472 /hugolib/content_map_page.go
parente33a63255187bb4c5323e107b727e1d7b0117d19 (diff)
downloadhugo-a66480f70c1ac734ba5af035e626d29ffcde157d.tar.gz
hugo-a66480f70c1ac734ba5af035e626d29ffcde157d.zip
Handle build vs _build in front matter
* Throw a detailed error message in the mentioned case * Also fixed a dropped error Fixes #11970
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r--hugolib/content_map_page.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go
index 9accd190e..27b37a8fc 100644
--- a/hugolib/content_map_page.go
+++ b/hugolib/content_map_page.go
@@ -1239,7 +1239,9 @@ func (sa *sitePagesAssembler) applyAggregates() error {
}
// Combine the cascade map with front matter.
- pageBundle.setMetaPost(cascade)
+ if err := pageBundle.setMetaPost(cascade); err != nil {
+ return false, err
+ }
// We receive cascade values from above. If this leads to a change compared
// to the previous value, we need to mark the page and its dependencies as changed.
@@ -1304,7 +1306,9 @@ func (sa *sitePagesAssembler) applyAggregates() error {
if data != nil {
cascade = data.(map[page.PageMatcher]maps.Params)
}
- pageResource.setMetaPost(cascade)
+ if err := pageResource.setMetaPost(cascade); err != nil {
+ return false, err
+ }
}
return false, nil
@@ -1369,7 +1373,9 @@ func (sa *sitePagesAssembler) applyAggregatesToTaxonomiesAndTerms() error {
if data != nil {
cascade = data.(map[page.PageMatcher]maps.Params)
}
- p.setMetaPost(cascade)
+ if err := p.setMetaPost(cascade); err != nil {
+ return false, err
+ }
if err := sa.pageMap.treeTaxonomyEntries.WalkPrefix(
doctree.LockTypeRead,