diff --git a/src/components/starlight/Head.astro b/src/components/starlight/Head.astro index b66d627..9cc4afb 100644 --- a/src/components/starlight/Head.astro +++ b/src/components/starlight/Head.astro @@ -3,6 +3,18 @@ import Default from "@astrojs/starlight/components/Head.astro"; import { getImagePath } from "@components/images"; +// Update the sitemap to point to our custom sitemap +Astro.locals.starlightRoute.head.forEach(({ tag, attrs }) => { + if ( + tag === "link" && + attrs && + attrs.rel === "sitemap" && + attrs.href === "/sitemap-index.xml" + ) { + attrs.href = "/ayc0-sitemap-index.xml"; + } +}); + let imagePath: string | undefined = await getImagePath( Astro.locals.starlightRoute.entry.data.image, ); diff --git a/src/layouts/Head.astro b/src/layouts/Head.astro index 5bc7333..f132ec5 100644 --- a/src/layouts/Head.astro +++ b/src/layouts/Head.astro @@ -22,6 +22,7 @@ let imagePath: string | undefined = await getImagePath(image); {title} {description ? : null} +