diff --git a/site/astro.config.mjs b/site/astro.config.mjs index a2d86aa..d3cb79c 100644 --- a/site/astro.config.mjs +++ b/site/astro.config.mjs @@ -49,11 +49,10 @@ function buildRedirects(base) { // Old anchor slug (spaces → hyphens only, no other substitutions) const oldSlug = service.name.replace(/ /g, '-').toLowerCase(); const newPath = `${base}/rules/${groupSlug}/${serviceSlug}/`; - // Redirect from flat old path (with and without trailing slash) - for (const oldPath of [`${base}/rules/${oldSlug}`, `${base}/rules/${oldSlug}/`]) { - if (oldPath !== newPath && oldPath !== newPath.slice(0, -1)) { - redirects[oldPath] = { destination: newPath, status: 301 }; - } + // Redirect from flat old path (without trailing slash; Astro handles the slash variant) + const oldPath = `${base}/rules/${oldSlug}`; + if (oldPath !== newPath && oldPath !== newPath.slice(0, -1)) { + redirects[oldPath] = { destination: newPath, status: 301 }; } } } @@ -102,6 +101,5 @@ export default defineConfig({ ], vite: { plugins: [yamlPlugin()], - assetsInclude: ['**/*.yml'], }, });