--- import type { HTMLAttributes } from 'astro/types'; type Props = HTMLAttributes<'a'>; const { href, ...props } = Astro.props; const { pathname } = Astro.url; const isActive = href === pathname || href === pathname.replace(/\/$/, ''); ---