From cabdbd51cc51dfa789d2a5fdf1d6265e90f47b92 Mon Sep 17 00:00:00 2001 From: itsfinniii <102350242+itsfinniii@users.noreply.github.com> Date: Sat, 28 Mar 2026 20:04:59 +0100 Subject: [PATCH] Fix pathname again --- astro/src/pages/[...route].astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astro/src/pages/[...route].astro b/astro/src/pages/[...route].astro index 69cbb5e..277f2b4 100644 --- a/astro/src/pages/[...route].astro +++ b/astro/src/pages/[...route].astro @@ -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);