aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page__meta.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-03 13:09:53 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-03 15:07:59 +0100
commit058f230a1be1abaf589b5a194ef6ec12d14c4021 (patch)
tree92d84e4e453c3e66075553445e09d78b3ae92d5d /hugolib/page__meta.go
parenta66480f70c1ac734ba5af035e626d29ffcde157d (diff)
downloadhugo-058f230a1be1abaf589b5a194ef6ec12d14c4021.tar.gz
hugo-058f230a1be1abaf589b5a194ef6ec12d14c4021.zip
Detect now invalid path patterns in cascade
Closes #11977
Diffstat (limited to 'hugolib/page__meta.go')
-rw-r--r--hugolib/page__meta.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go
index 35b7766b6..7b785abb6 100644
--- a/hugolib/page__meta.go
+++ b/hugolib/page__meta.go
@@ -33,6 +33,7 @@ import (
"github.com/gohugoio/hugo/common/constants"
"github.com/gohugoio/hugo/common/hugo"
+ "github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/config"
@@ -272,7 +273,7 @@ func (p *pageMeta) Weight() int {
return p.pageConfig.Weight
}
-func (p *pageMeta) setMetaPre(pi *contentParseInfo, conf config.AllProvider) error {
+func (p *pageMeta) setMetaPre(pi *contentParseInfo, logger loggers.Logger, conf config.AllProvider) error {
frontmatter := pi.frontMatter
if frontmatter != nil {
pcfg := p.pageConfig
@@ -285,7 +286,7 @@ func (p *pageMeta) setMetaPre(pi *contentParseInfo, conf config.AllProvider) err
// Check for any cascade define on itself.
if cv, found := frontmatter["cascade"]; found {
var err error
- cascade, err := page.DecodeCascade(cv)
+ cascade, err := page.DecodeCascade(logger, cv)
if err != nil {
return err
}
@@ -437,7 +438,6 @@ func (p *pageState) setMetaPostParams() error {
}
pm.pageConfig.Build, err = pagemeta.DecodeBuildConfig(buildConfig)
if err != nil {
- //lint:ignore ST1005 end user message.
var msgDetail string
if isNewBuildKeyword {
msgDetail = `. We renamed the _build keyword to build in Hugo 0.123.0. We recommend putting user defined params in the params section, e.g.: