--- // Menu tree from shared/data/docs.json. import Subheader from '@ui/Subheader.astro' import docs from '@data/docs.json' import { pathSlug as slug } from '@shared/lib/string-format' interface MenuLeaf { title: string url: string } interface MenuGroup extends MenuLeaf { children?: MenuLeaf[] } interface MenuSection { title: string children?: MenuGroup[] } interface Props { /** Page URL in the docs namespace (equivalent of page.url), e.g. "/ui/components/alert/". */ url: string } const { url } = Astro.props const menu = docs.menu as MenuSection[] ---