fix(i18n): exclude 404 pages from sitemap
Custom 404 pages (root and zh-cn) were indexed as regular content in the sitemap. Add a filter to the @astrojs/sitemap integration that matches the /404 path segment precisely via regex on the URL pathname.
This commit is contained in:
parent
96eec1cc22
commit
5608797aa0
|
|
@ -36,7 +36,11 @@ export default defineConfig({
|
|||
},
|
||||
|
||||
integrations: [
|
||||
sitemap(),
|
||||
// Exclude custom 404 pages (all locales) from the sitemap — they are
|
||||
// treated as normal content docs by Starlight even with disable404Route.
|
||||
sitemap({
|
||||
filter: (page) => !/\/404(\/|$)/.test(new URL(page).pathname),
|
||||
}),
|
||||
starlight({
|
||||
title: 'BMAD Method',
|
||||
tagline: 'AI-driven agile development with specialized agents and workflows that scale from bug fixes to enterprise platforms.',
|
||||
|
|
|
|||
Loading…
Reference in New Issue