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

Deprecate .Site.Sites.First in favor of .Site.Sites.Default #12513

Closed
jmooring opened this issue May 17, 2024 · 1 comment · Fixed by #12559
Closed

Deprecate .Site.Sites.First in favor of .Site.Sites.Default #12513

jmooring opened this issue May 17, 2024 · 1 comment · Fixed by #12559

Comments

@jmooring
Copy link
Member

jmooring commented May 17, 2024

Prior to v0.123.0, .Site.Sites returned the sites sorted by weight then language key. With v0.123.0 and later, the site corresponding to the default language is first on the list.

With this config...

defaultContentLanguage = 'de'

[languages.en]
weight = 1

[languages.de]
weight = 2

[languages.fr]
weight = 3

....Site.Sites.First now returns the second site, which is exactly what it should be doing. But I think we should rename the method to describe what it does.

If implemented, need to update:

Copy link

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 Jun 23, 2024
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.

2 participants