import { escapeHtml } from '../html/escapeHtml'; import { isCurrent } from './isCurrent'; import { type SiteLink } from './types'; /** One link of the site, its address on `base`, marked current when it is the page's. */ export function navLink(o: { link: SiteLink; base: string; path?: string }) { const current = isCurrent(o.link.path, o.path) ? ' aria-current="page"' : ''; return `${escapeHtml(o.link.label)}`; }