You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to use starlight with an existing astro setup.
Starlight forces you to use the @astrojs/sitemap integration. There is no way to opt-out (only from injecting a <link> to the head) nor configure it (add filters).
Currently there is no way to avoid this issue if you'd like to use a configured sitemap integration:
error Found more than one instance of @astrojs/sitemap.
Starlight includes @astrojs/sitemap by default.
Please remove it from your integrations array in astro.config.mjs
I think it would be preferable to have an option to opt-out entirely from all of the sitemap generation in starlight in case of an existing astro setup.
Link to Minimal Reproducible Example
No response
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
Thanks for the issue @turbek. Yes, we should probably offer a way to opt out.
We opted to make the sitemap integration built in to Starlight as it allows us to configure the i18n set up for sitemaps automatically, which otherwise would be kind of annoying to maintain twice, but an opt out for sites that need custom sitemap config probably makes sense. I guess the alternative would be allowing passing through sitemap options via Starlight? Not sure whether that’s preferable.
Would be happy to receive a PR for whichever approach someone would like to champion.
Update here: Astro 3.2 (releasing today) includes a small change that will let us make a big improvement here. We should be able to check if a user already added sitemap and if so, skip adding it in Starlight, which isn’t currently possible.
What version of
starlight
are you using?0.9.1
What version of
astro
are you using?3.0.10
What package manager are you using?
npm
What operating system are you using?
Windows
What browser are you using?
Chrome
Describe the Bug
We'd like to use starlight with an existing astro setup.
Starlight forces you to use the
@astrojs/sitemap
integration. There is no way to opt-out (only from injecting a<link>
to the head) nor configure it (add filters).Currently there is no way to avoid this issue if you'd like to use a configured sitemap integration:
it is easy to check, the sitemap integration is not configurable:
https://github.com/withastro/starlight/blob/main/packages/starlight/integrations/sitemap.ts
I think it would be preferable to have an option to opt-out entirely from all of the sitemap generation in starlight in case of an existing astro setup.
Link to Minimal Reproducible Example
No response
Participation
The text was updated successfully, but these errors were encountered: