I found my solution.
The issue was (I think?) a bug in hugo.
The config file was found via hugo config and the mounts also via hugo config mounts
BUT
the configs werent tracked from the “configs” folder in the theme. So my mount definition just wasnt executed.
So there were two solutions:
- Use a themefolder-level config file without separation e.g.
config.yaml - Use (following that thread )
_merge: shallowordeep. This must be done onsitelevel of configuration e.g.hugo-site/config/config.yaml
BUT I could not use the separation of the configuration files like on site-level
config
_default
--------config.yaml
--------params.yaml
--------module.yaml
this was not possible on theme level.
So is this a bug ?
Steps to reproduce:
- create a theme
- create config folder for theme
- put configs in
config.yamlandparams.yaml - use this debug helper or do your own
{{ define "main }}
<pre>
{{ debug.Dump .Site.Params }}
</pre>
{{ end }}
Look at the params and if the ones in from the theme are available as well.
Hope this helps ![]()
TLDR Solution (for the problem, not directly the questions)
- make sure that your config.yaml file is placed on theme-level and not in a config-folder
Hugo Version
hugo v0.140.2-aae02ca612a02e085c08366a9c9279f4abb39d94+extended linux/amd64 BuildDate=2024-12-30T15:01:53Z VendorInfo=gohugoio