Skip to content

docs: Sitemaps #970

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

Merged
merged 11 commits into from
Apr 17, 2024
Merged

docs: Sitemaps #970

merged 11 commits into from
Apr 17, 2024

Conversation

amannn
Copy link
Owner

@amannn amannn commented Mar 30, 2024

Preview

TODO

  • Wait for stable Next.js release with support for alternate URLs
  • Check inilne todos

Copy link

vercel bot commented Mar 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2024 4:54pm
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2024 4:54pm


If you're using a sitemap to inform search engines about all pages of your site, you can attach [locale-specific alternate entries](https://developers.google.com/search/docs/specialty/international/localized-versions#sitemap) to every URL in the sitemap to indicate that a particular page is available in multiple languages or regions.

Next.js supports providing alternate URLs per language via the [`alternates` entry](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-localized-sitemap) as of version 14.2. You can use your default locale for the main URL and provide alternate URLs based on all locales that your app supports. Note that also the default locale should be included in the `alternates` object.
Copy link
Owner Author

@amannn amannn Mar 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Make sure this version number is correct

}
```

[(working implementation)](https://github.com/amannn/next-intl/blob/main/examples/example-app-router/src/app/sitemap.ts)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will work after merge

@@ -13,7 +13,7 @@
},
"dependencies": {
"clsx": "^1.2.1",
"next": "^14.1.0",
"next": "14.2.0-canary.49",
Copy link
Owner Author

@amannn amannn Mar 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Revert

@amannn amannn merged commit b311ebc into main Apr 17, 2024
5 checks passed
@amannn amannn deleted the docs/sitemap branch April 17, 2024 17:00
juanforlizzi pushed a commit to juanforlizzi/next-intl that referenced this pull request Jan 16, 2025
[Preview](https://next-intl-docs-git-docs-sitemap-next-intl.vercel.app/docs/environments/sitemap)

**TODO**
- [x] Wait for stable Next.js release with support for alternate URLs
- [x] Check inilne todos
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.

1 participant