Fix pathname again

This commit is contained in:
itsfinniii
2026-03-28 20:04:59 +01:00
parent 1e3243aac3
commit cabdbd51cc

View File

@@ -25,7 +25,7 @@ export async function getStaticPaths() {
}
const settings = await getSettings();
const pathName = Astro.url.pathname.replace(/\/$/, "");
const pathName = Astro.url.pathname === "/" ? "/" : Astro.url.pathname.replace(/\/$/, "");
const page = await getPage(settings, pathName);
console.log(pathName);