--- import "../styles/base.css"; import type { MarkdownHeading } from "astro"; const fm = Astro.props.frontmatter || Astro.props; const title = fm.title; const description = fm.description || "desktop control for AI agents"; const toc = fm.toc ?? false; const headings: MarkdownHeading[] = Astro.props.headings ?? []; const isIndex = Astro.url.pathname === "/" || Astro.url.pathname === "/index.html"; const h2s = headings.filter((h) => h.depth === 2); function formatTocText(text: string): string { if (!text.includes(" ") && /[-.]/.test(text)) { return `${text}`; } return text.replace(/\(([^)]+)\)/g, "($1)"); } --- {title ? `${title} — deskctl` : "deskctl"} { !isIndex && ( ) } { toc && ( ) }