As the example site shown, we use Configuration Directory to maintain easier organization and environment specific settings, it is especially useful on multilingual sites.
% code/configuration-structure %
Hugo supports multiple configuration formats:
TOML,YAMLandJSON, change it at will.
_defaultcontains the default configurations.productionconfigurations will override the default configurations on production environment.- You can also define more environment configurations, such as
development(the default environment ofhugo server),testing,staging. And then specify the environment via-eflag. - The configurations filename with language code affected take effect only on that language site, such as
config.zh-hans.toml, it’s useful to separate configurations and parameters from different languages.
The multilingual configurations doesn’t work on
authorconfigurations, that is,author.zh-hans.tomlwill not take effect. Theconfig,params,menuandmenusare known that supported multilingual configuring.
Comments