-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiongood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.If you are just getting started with Docusaurus, this issue should be a good place to begin.status: accepting prThis issue has been accepted, and we are looking for community contributors to implement thisThis issue has been accepted, and we are looking for community contributors to implement this
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
The built site does not have og:locale and og:locale:alternate meta tags in the Head.
Reproducible demo
https://codesandbox.io/p/sandbox/zen-wildflower-kpuv6l?file=%2FREADME.md
Steps to reproduce
- Add at least two locales to docusaurus.config.js.
e.g.
i18n: {
defaultLocale: "en",
locales: ["en", "hu"],
localeConfigs: {
en: {
label: "English",
direction: "ltr",
htmlLang: "en-US",
calendar: "gregory",
},
hu: {
label: "Magyar",
direction: "ltr",
htmlLang: "hu-HU",
calendar: "gregory",
path: "hu",
},
},
},- Build
- Serve
Expected behavior
In the built site pages in the Head tag og:locale and og:locale:alternate meta tags are present.
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="hu_HU" />Actual behavior
In the built site pages in the Head tag og:locale and og:locale:alternate meta tags are not present.
Your environment
- Public source code: no public code
- Public site URL: no public site
- Docusaurus version used: 2.4.0
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Microsoft Edge Version 112.0.1722.39 (Official build) (64-bit)
- node --version: v18.13.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
- Edition Windows 11 Enterprise
- Version 22H2
- OS build 22621.1413
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiongood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.If you are just getting started with Docusaurus, this issue should be a good place to begin.status: accepting prThis issue has been accepted, and we are looking for community contributors to implement thisThis issue has been accepted, and we are looking for community contributors to implement this