diff --git a/astro.config.mjs b/astro.config.mjs index 817d05e93f..c369fc960b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -68,6 +68,12 @@ export default defineConfig({ icon(), react(), sitemap({ + // Only the canonical //… URLs belong in the sitemap. The catch-all + // `[...path].astro` also emits language-less redirect stubs (e.g. `/guide/x`, + // and `/` → `/en/`, all `noindex`); drop anything without a locale prefix. + // Keep this locale list in sync with `i18n.locales` below. + filter: (page) => + /^\/(de|en|es|fr|it|ja|ko|pt-br|zh-cn|zh-tw)(\/|$)/.test(new URL(page).pathname), i18n: { defaultLocale: 'en', locales: {