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 · 0 comments · Fixed by #12559
Closed

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

jmooring opened this issue May 17, 2024 · 0 comments · Fixed by #12559
Milestone

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants