--- import { navItems, site } from '../lib/site'; const current = Astro.url.pathname; // Exact match for the current page; section match (descendant URLs) for // ancestor links. `aria-current="page"` is reserved for the exact page, // `"true"` indicates an ancestor section. function currentState(href: string): 'page' | 'true' | undefined { if (current === href) return 'page'; if (href !== '/' && current.startsWith(href)) return 'true'; return undefined; } // Header shows nav items except Home and footer-only entries. RSS lives as a // dedicated icon link to the right of the nav. const headerNavItems = navItems.filter((item) => item.href !== '/' && !item.footerOnly); ---