mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Make language merging of markup etc. config without values in the root
Updates #10953
This commit is contained in:
@@ -214,22 +214,6 @@ func (l configLoader) normalizeCfg(cfg config.Provider) error {
|
||||
cfg.Set("minify", maps.Params{"minifyOutput": true})
|
||||
}
|
||||
|
||||
// Simplify later merge.
|
||||
languages := cfg.GetStringMap("languages")
|
||||
for _, v := range languages {
|
||||
switch m := v.(type) {
|
||||
case maps.Params:
|
||||
// params have merge strategy deep by default.
|
||||
// The languages config key has strategy none by default.
|
||||
// This means that if these two sections does not exist on the left side,
|
||||
// they will not get merged in, so just create some empty maps.
|
||||
if _, ok := m["params"]; !ok {
|
||||
m["params"] = maps.Params{}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user