Unless the merge strategy is set up to do so.
For `disableKinds` the current workaround is to make sure the project config has an entry, even if is empty:
```
disableKinds = []
```
Note that this issue only touches root, non-map config-values that either is not set in project config or in Hugo's defaults.
Fixes #8866
p.merge("", pp)
}
+// MergeRoot transfers values from pp to p for new keys where p is the
+// root of the tree.
+// This is done recursively.
+func (p Params) MergeRoot(pp Params) {
+ ms, _ := p.GetMergeStrategy()
+ p.merge(ms, pp)
+}
+
func (p Params) merge(ps ParamsMergeStrategy, pp Params) {
ns, found := p.GetMergeStrategy()
}
}
// Merge the rest.
- c.root.Merge(p)
+ c.root.MergeRoot(p)
for _, k := range keysToDelete {
delete(c.root, k)
}
c.Assert(cfg.Get(""), qt.DeepEquals, maps.Params{
"a": "av",
- "b": "bv2",
})
})
themeConfig := `
baseURL = "http://bep.is/"
+# Can not be set in theme.
+disableKinds = ["taxonomy", "term"]
+
# Can not be set in theme.
[frontmatter]
expiryDate = ["date"]
got := b.Cfg.Get("").(maps.Params)
+ // Issue #8866
+ b.Assert(b.Cfg.Get("disableKinds"), qt.IsNil)
+
b.Assert(got["params"], qt.DeepEquals, maps.Params{
"b": maps.Params{
"b1": "b1 main",