I struggle with the same kind of problem described in Partial overwrite for outputs option - #2 by davidsneighbour
In the documentation it is written
Also note that a component that is part of a theme can have its own configuration file, e.g. config.toml. > There are currently some restrictions to what a theme component can configure:
params (global and per language)
menu (global and per language)
outputformats and mediatypesThe same rules apply here: The left-most param/menu etc. with the same ID will win.
So I was adding a theme component, and was expecting that I can “overide” some component config.toml option in my main config site.
myComponent config.toml
[params]
[params.global]
[params.global.map]
[params.global.map.osm]
test1 = "component config test 1"
test2 = "component config test 2"
I was expecting to overide one entry in my main site config.toml
theme = ["navigator-hugo", "hugo-notice", "myComponent"]
[params]
[params.global]
[params.global.map]
[params.global.map.osm]
test1 = "main config test 1"
test2 = "main config test 2"
This is for example from my partials in component and in main site:
{{ site.Params.global.map.osm.test1 }}
{{ site.Params.global.map.osm.test2 }}
I always get the main value (main config test 1
& main config test 2
) as result, either in component or in main site.
And if I have no test2
in my main config.toml i get nothing (nil) for site.Params.global.map.osm.test2
, even if it is setup in my component.
May be I wrongly understood the documentation ? Any pointer/explanation on what i didn’t understood will be helpfull. Thanks.