Load other config file from withing the main one

Hi there,
while developing a multilanguage website with menus, the config.toml gets quickly overwhelming. Is there a trick to load one or more external config files from within the main one? I know I can start hugo with more config files, but I would prefer to run it with one only, and let that one to run other config files (e.g. for menus in different languages).



I was beginning to say “no”. We have been discussing adding some “external config” support for this reason. But we have not gotten that far … But with the latest Hugo and its theme component support, what you can do (and I guess it also may help in other areas) is to do something ala:


Etc. and add a config.toml file to each of those “theme components” – and include these in the theme list in the project. There are restrictions for what you can set in these files, but for your use case I think you should be good.

You can obviously also add layouts etc., but this should work fine with just the config.toml file per “theme component”.

Thanks @bep, useful hints!