mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
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
This commit is contained in:
@@ -152,6 +152,9 @@ name = "menu-top-main"
|
||||
themeConfig := `
|
||||
baseURL = "http://bep.is/"
|
||||
|
||||
# Can not be set in theme.
|
||||
disableKinds = ["taxonomy", "term"]
|
||||
|
||||
# Can not be set in theme.
|
||||
[frontmatter]
|
||||
expiryDate = ["date"]
|
||||
@@ -228,6 +231,9 @@ name = "menu-theme"
|
||||
|
||||
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",
|
||||
|
Reference in New Issue
Block a user