Detect now invalid path patterns in cascade

Closes #11977
This commit is contained in:
Bjørn Erik Pedersen
2024-02-03 13:09:53 +01:00
parent a66480f70c
commit 058f230a1b
7 changed files with 72 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ import (
"strings"
"github.com/gohugoio/hugo/cache/filecache"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/config"
@@ -42,10 +43,11 @@ import (
)
type decodeConfig struct {
p config.Provider
c *Config
fs afero.Fs
bcfg config.BaseConfig
p config.Provider
c *Config
fs afero.Fs
logger loggers.Logger
bcfg config.BaseConfig
}
type decodeWeight struct {
@@ -291,7 +293,7 @@ var allDecoderSetups = map[string]decodeWeight{
key: "cascade",
decode: func(d decodeWeight, p decodeConfig) error {
var err error
p.c.Cascade, err = page.DecodeCascadeConfig(p.p.Get(d.key))
p.c.Cascade, err = page.DecodeCascadeConfig(p.logger, p.p.Get(d.key))
return err
},
},