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

fix: compatibility with og:locale #50

Merged
merged 1 commit into from
Dec 10, 2019
Merged

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Dec 10, 2019

A change introduced in hexojs/hexo#3808, og:locale Open Graph tag only accepts "language_TERRITORY" format.

Since "language_TERRITORY" breaks multilingual support, user should instead use "language-TERRITORY" format which is automatically transformed to "language_TERRITORY" in open_graph() helper.

However, "language-TERRITORY" still breaks multilingual support for non-ZH users, this PR fixes that.

See official list (by Facebook; Hexo only checks the length, not the value itself) of supported locales.

@curbengh
Copy link
Contributor Author

I created a workaround in the upstream (hexojs/hexo#3921) to minimize breaking change. Despite that, I still think this PR is necessary.

@geekplux
Copy link
Owner

You are thoughtful, thanks for your great work.

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

Successfully merging this pull request may close these issues.

2 participants