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│ ├── author.toml
3│ ├── config.toml
4│ ├── config.zh-hans.toml
5│ ├── config.zh-hant.toml
6│ ├── languages.toml
7│ ├── markup.toml
8│ ├── menu.toml
9│ ├── menu.zh-hans.toml
10│ ├── menu.zh-hant.toml
11│ ├── params.toml
12│ ├── params.zh-hans.toml
13│ ├── params.zh-hant.toml
14│ ├── server.toml
15│ └── social.toml
16└── production
17 ├── config.toml
18 └── params.toml
Hugo supports multiple configuration formats:
TOML
,YAML
andJSON
, 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 ofhugo 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. Theconfig
,params
,menu
andmenus
are known that supported multilingual configuring.
Comments