Feature worth? config/_default/params.subsection.toml for clarity

I was wondering (and testing, it doesn’t) if it would be possible to move subsections of configuration sections into sub-files. In my case I have Lots of subsections in params.toml (in the config-substructure) and helped myself with plenty of commenting and “comment dividers” (just a bunch of hashes to create separation) to get the config in order.

Would it be complicated to implement a system, where the config directory is parsed deeper than just the root sections, maybe only for the [params] section? If I have for instance [params.dnb.module1] and [params.dnb.module2] would it be doable to read config/_default/params.dnb.module1.toml and config/_default/params.dnb.module2.toml into these sections?

Only asking, because somehow I thought to have read either between the lines or in an issue somewhere, that this works, and my testing did not result in any luck. Just asking. If not, I’ll delete that part of my memory :slight_smile:

The potential problem (i think), params is one of config root keys than can be defined per-language.

params.en.yaml will be parsed as:

      <key>: <val>  # The content params.en.yaml


  1. config/_default/params.dnb.yaml
  2. config/_default/params.dnb.en.yaml

How does Hugo differentiate between dnb in (1) and en in (2), whether it is language key or regular map key?


I did not think about i18n. That makes it more complicated.