Support custom slugs for localized pages via Frontmatter while maintaining internal links #2837
benjaminbarbe
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.31.1
What is your idea?
Currently, Starlight supports i18n, where a URL like /getting-started/ is automatically localized to /fr/getting-started/.
I would like to define a custom slug via Frontmatter to maintain Astro’s route creation logic while ensuring that Starlight preserves the internal link structure. The link should be based on the file name on disk (e.g., docs/fr/getting-started.mdx).
Why is this feature necessary?
Allowing custom slugs would improve SEO by creating cleaner, keyword-optimized URLs that rank better in search engines. It would also enable Starlight to generate proper tags, ensuring search engines correctly associate language variants and serve the right version based on user location and language.
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions