You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then, I moved config.toml into /config/_default. The website can still be built.
Then, I put the language configurations into another file called languages.toml
When I run hugo -v, I get the following error: site config value "en" for defaultContentLanguage does not match any language definition
Then, when I put DefaultContentLanguage = "en" into languages.toml, I get the following error: Failed to parse multilingual config: Language config is not a map: string
I then put the language configuration back into config.toml. Afterwards, I tried putting language-specific menu configs in their own files (menus.en.toml, menus.ja.toml, menus.zh-tw.toml, menus.zn-cn.toml). So I have config.toml and a couple of menus..toml files. I got the following error: unable to process menus in site config
Once line for each language
unable to cast map[string]interface {}{"en":map[string]interface {}{"menu":map[string]interface {}{"main":[]map[string]interface {}{map[string]interface {}{"name":"Home", "url":"/en"}}}}} of type map[string]interface {} to []interface{}
It seems like I have to keep everything inside the main config.toml in order for multilingual configurations to work. The screenshot on getting-started/configuration doc page under "Configuration Directory" seemed to state otherwise.
The text was updated successfully, but these errors were encountered:
mostaja
changed the title
Problems with separating configurations into separate config files
Problems with separating multilingual configurations into separate config files
May 14, 2019
Version v0.55.5-A83256B9
I started out with a barebones site by running
hugo new site
command, and also started out with a blank theme.Then I configured the config.toml in the project root so that it supports multilingual site. The configuration is as follows:
then, I moved config.toml into /config/_default. The website can still be built.
Then, I put the language configurations into another file called languages.toml
When I run hugo -v, I get the following error:
site config value "en" for defaultContentLanguage does not match any language definition
Then, when I put DefaultContentLanguage = "en" into languages.toml, I get the following error:
Failed to parse multilingual config: Language config is not a map: string
I then put the language configuration back into config.toml. Afterwards, I tried putting language-specific menu configs in their own files (menus.en.toml, menus.ja.toml, menus.zh-tw.toml, menus.zn-cn.toml). So I have config.toml and a couple of menus..toml files. I got the following error:
unable to process menus in site config
Once line for each language
It seems like I have to keep everything inside the main config.toml in order for multilingual configurations to work. The screenshot on getting-started/configuration doc page under "Configuration Directory" seemed to state otherwise.
The text was updated successfully, but these errors were encountered: