--- import MobileMenuFooter from '@astrojs/starlight/components/MobileMenuFooter.astro'; import SidebarPersister from '@astrojs/starlight/components/SidebarPersister.astro'; import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro'; const { sidebar, id } = Astro.locals.starlightRoute; import { Icon } from '@astrojs/starlight/components'; import TabbedContent from './tabs/TabbedContent.astro'; import TabListItem from './tabs/TabListItem.astro'; import TabPanel from './tabs/TabPanel.astro'; /** Get the icon for a group. Update the icon names in the array to change the icons associated with a group. */ const getIcon = (index: number) => (['nix', 'open-book', 'rocket', 'puzzle', 'information', 'setting'] as const)[index]; /** Convert a group label to an `id` we can use to identify tab panels. */ // The id is prefixed to avoid clashing with existing heading IDs on the page. const makeId = (label: string) => '__tab-' + label.toLowerCase().replaceAll(/\s+/g, '-'); /** Determine if an array of sidebar items contains the current page. */ const isCurrent = (sidebar: SidebarEntry[]): boolean => sidebar .map((entry) => (entry.type === 'link' ? entry.isCurrent : isCurrent(entry.entries))) .some((entry) => entry === true); --- { sidebar.map(({ label, entries }, index) => ( {label} )) } { sidebar.map(({ label, entries }) => ( )) }