Skip to content
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

Closed
bep opened this issue Jan 30, 2018 · 1 comment · Fixed by #4358
Closed

Improve language params handling #4356

bep opened this issue Jan 30, 2018 · 1 comment · Fixed by #4358
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Jan 30, 2018

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:

[languages]
[languages.en]
languageName = "English"
weight = 1
title = "My Cool Site"
[languages.en.params]
myParam = "Hi!"

The story is slightly longer than the above, but it should fix #4352 and other similar corner cases, and make language configuration more obvious.

@bep bep added this to the v0.35 milestone Jan 30, 2018
@bep bep self-assigned this Jan 30, 2018
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 bep closed this as completed in #4358 Jan 30, 2018
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
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant