Partial overwrite for outputs option

I am working on a theme component that provides a certain type of output format. The problem is, it seems that themes and components are overwriting their config.toml files from the left, so that a line from “my” config is overwritten in the websites config.toml.

my config.toml:

home = ["REDIR", "HEADERS" ]

my sites config:

home = [ "HTML", "RSS" ]

resulting config:

home = [ "HTML", "RSS"]

Is there any way to add my output formats via config.toml in my theme components or must it be via manual adding it to the users config.toml?

I would think that it might be a nice feature if a theme component’s config.toml would be merged into the final config.toml, as opposed to being overwritten. For Example for my two files above resulting in:

home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
# or maybe merging from left
home = ["REDIR", "HEADERS", "HTML", "RSS" ]

I am open to being taught other options or ways. The end goal is to make it like a drop-in, without configuration. Or better the least configuration required. Add it, forget about it.

As for adding this as feature: probably not all config.toml options should be merged, but I could at least envision it in the outputs, params, mediaTypes department…

After playing around it appears as if mediaTypes and outputFormats are already merged and not overwritten. Probably because they are arrays or slices ( or however Golang names this :wink: ). But the home bit of the [outputs] section still overwrites instead of merging or combining the array.