--- import IconX from "@/assets/icons/IconX.svg"; import IconMoon from "@/assets/icons/IconMoon.svg"; import IconSearch from "@/assets/icons/IconSearch.svg"; import IconArchive from "@/assets/icons/IconArchive.svg"; import IconSunHigh from "@/assets/icons/IconSunHigh.svg"; import IconMenuDeep from "@/assets/icons/IconMenuDeep.svg"; import LinkButton from "./LinkButton.astro"; import { SITE } from "@/config"; const { pathname } = Astro.url; // Remove trailing slash from current pathname if exists const currentPath = pathname.endsWith("/") && pathname !== "/" ? pathname.slice(0, -1) : pathname; const isActive = (path: string) => { const currentPathArray = currentPath.split("/").filter(p => p.trim()); const pathArray = path.split("/").filter(p => p.trim()); return currentPath === path || currentPathArray[0] === pathArray[0]; }; --- Skip to content
{SITE.title}