As the example site shown, we use Configuration Directory to maintain easier organization and environment specific settings, it is especially useful on multilingual sites.

 1β”œβ”€β”€ _default
 2β”‚   β”œβ”€β”€ config.toml
 3β”‚   β”œβ”€β”€ config.zh-hans.toml
 4β”‚   β”œβ”€β”€ config.zh-hant.toml
 5β”‚   β”œβ”€β”€ languages.toml
 6β”‚   β”œβ”€β”€ markup.toml
 7β”‚   β”œβ”€β”€ menu.toml
 8β”‚   β”œβ”€β”€ menu.zh-hans.toml
 9β”‚   β”œβ”€β”€ menu.zh-hant.toml
10β”‚   β”œβ”€β”€ params.toml
11β”‚   β”œβ”€β”€ params.zh-hans.toml
12β”‚   β”œβ”€β”€ params.zh-hant.toml
13β”‚   β”œβ”€β”€ server.toml
14└── production
15    β”œβ”€β”€ config.toml
16    └── params.toml

Hugo supports multiple configuration formats: TOML, YAML and JSON, change it at will.

  • _default contains the default configurations.
  • production configurations will override the default configurations on production environment.
  • You can also define more environment configurations, such as development(the default environment of hugo server), testing, staging. And then specify the environment via -e flag.
  • 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 author configurations, that is, author.zh-hans.toml will not take effect. The config, params, menu and menus are known that supported multilingual configuring.