diff --git a/src/pages/blog/[...path].astro b/src/pages/blog/[...path].astro index b5aa3ca..228f4b3 100644 --- a/src/pages/blog/[...path].astro +++ b/src/pages/blog/[...path].astro @@ -17,6 +17,10 @@ export async function getStaticPaths() { const { path } = Astro.params const posts = await getPosts(path) + +function activeLink(pathname: string) { + return Astro.url.pathname.replace(/\/+/g, '/').replace(/\/$/, '') === pathname +} --- ( {nav.text}