-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve language params handling #4356
Comments
bep
added a commit
to bep/hugo
that referenced
this issue
Jan 30, 2018
This fixes some issues with language params handling by separating params from configuration values per language. This means that you can now do this: ```toml [languages] [languages.en] languageName = "English" weight = 1 title = "My Cool Site" [languages.en.params] myParam = "Hi!" ``` This is not a breaking change, but the above is a less suprising way of configuring custom params. It also fixes some hard-to-debug corner-cases in multilingual sites. Fixes gohugoio#4356 Fixes gohugoio#4352
bep
added a commit
to bep/hugo
that referenced
this issue
Jan 30, 2018
This fixes some issues with language params handling by separating params from configuration values per language. This means that you can now do this: ```toml [languages] [languages.en] languageName = "English" weight = 1 title = "My Cool Site" [languages.en.params] myParam = "Hi!" ``` This is not a breaking change, but the above is a less suprising way of configuring custom params. It also fixes some hard-to-debug corner-cases in multilingual sites. Fixes gohugoio#4356 Fixes gohugoio#4352
bep
added a commit
that referenced
this issue
Jan 30, 2018
This fixes some issues with language params handling by separating params from configuration values per language. This means that you can now do this: ```toml [languages] [languages.en] languageName = "English" weight = 1 title = "My Cool Site" [languages.en.params] myParam = "Hi!" ``` This is not a breaking change, but the above is a less suprising way of configuring custom params. It also fixes some hard-to-debug corner-cases in multilingual sites. Fixes #4356 Fixes #4352
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I scratched my head looking into #4352.
I will fix this properly and in a backwards compatible way. I guess we were a little tired and eager to wrap it up when we created the multilingual feature, which has config values and custom params in one map, which when merged with the global settings has potential naming conflicts.
So, we need to add a proper
params
map to each language, so people can do:The story is slightly longer than the above, but it should fix #4352 and other similar corner cases, and make language configuration more obvious.
The text was updated successfully, but these errors were encountered: