diff --git a/frontend/scripts/prerender-seo.mjs b/frontend/scripts/prerender-seo.mjs index 89d3c6b7..6d199084 100644 --- a/frontend/scripts/prerender-seo.mjs +++ b/frontend/scripts/prerender-seo.mjs @@ -108,10 +108,13 @@ try { // Route metadata for the prod app shell (title/description per SEO route), // so // paths that fall through to it get the route's own // head instead of the homepage's. + const { SEO_ROUTES } = await vite.ssrLoadModule('/src/seoRoutes.ts'); writeFileSync( join(distDir, 'seo-routes.json'), JSON.stringify( - routes.map((r) => ({ path: r.path, title: r.seoMeta.title, description: r.seoMeta.description })), + SEO_ROUTES.filter((r) => r.seoMeta && !r.noindex).map((r) => ({ + path: r.path, title: r.seoMeta.title, description: r.seoMeta.description, + })), ), 'utf-8', );