From 115b1cfad1ed8b6516de1f0089e29df80e554e5e Mon Sep 17 00:00:00 2001 From: Deflaktor Date: Mon, 24 Jun 2024 22:04:49 +0200 Subject: [PATCH] Fix highlight on current active page --- src/components/navbar.astro | 5 ++++- src/layouts/boardsLayout.astro | 3 ++- src/lib/utils.ts | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 src/lib/utils.ts diff --git a/src/components/navbar.astro b/src/components/navbar.astro index 68d60f94a..bf31cc3fd 100644 --- a/src/components/navbar.astro +++ b/src/components/navbar.astro @@ -1,6 +1,9 @@ --- -const currentPagePath = Astro.url.pathname; +import { getPathnameWithoutExtension } from "~/lib/utils"; + +const currentPagePath = getPathnameWithoutExtension(Astro.url); --- +