diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-08-22 12:57:37 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-08-22 14:25:20 +0300 |
commit | f4ffeea71dd3d044a2628bbb5d6634680667398f (patch) | |
tree | 468f421ff5f3c9ee459203ce596869191bb42b91 /common | |
parent | 7ba3f3d201e386cb9c7c15df5a6cc1c4b46473bd (diff) |
Fix it so disableKinds etc. does not get merged in from theme
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
Diffstat (limited to 'common')
-rw-r--r-- | common/maps/params.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/maps/params.go b/common/maps/params.go index c14026df7..15511f56f 100644 --- a/common/maps/params.go +++ b/common/maps/params.go @@ -76,6 +76,14 @@ func (p Params) Merge(pp Params) { 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() |