diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-02-26 16:13:05 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-26 17:29:37 +0100 |
commit | 1736ef745908454fb45b9e566aa8d44722990c05 (patch) | |
tree | 2bf7eff7ed77dcab3cdd6d52990cdc877d00ac3f /config/allconfig/allconfig.go | |
parent | d4be1643a08cbaaf577d3b6df6549405b865c3f3 (diff) | |
download | hugo-1736ef745908454fb45b9e566aa8d44722990c05.tar.gz hugo-1736ef745908454fb45b9e566aa8d44722990c05.zip |
Fix cascade-pattern-with-extension for cascade in site config
Also clean up the log handling in the integration tester, most notably lost logs during the config loading.
Fixes #12151
Diffstat (limited to 'config/allconfig/allconfig.go')
-rw-r--r-- | config/allconfig/allconfig.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go index 469a164cf..9cafc876e 100644 --- a/config/allconfig/allconfig.go +++ b/config/allconfig/allconfig.go @@ -671,6 +671,13 @@ type Configs struct { configLangs []config.AllProvider } +func (c *Configs) Validate(logger loggers.Logger) error { + for p := range c.Base.Cascade.Config { + page.CheckCascadePattern(logger, p) + } + return nil +} + // transientErr returns the last transient error found during config compilation. func (c *Configs) transientErr() error { for _, l := range c.LanguageConfigSlice { @@ -969,7 +976,7 @@ func decodeConfigFromParams(fs afero.Fs, logger loggers.Logger, bcfg config.Base }) for _, v := range decoderSetups { - p := decodeConfig{p: p, c: target, fs: fs, logger: logger, bcfg: bcfg} + p := decodeConfig{p: p, c: target, fs: fs, bcfg: bcfg} if err := v.decode(v, p); err != nil { return fmt.Errorf("failed to decode %q: %w", v.key, err) } |