---
// TOC comes in as a prop from the consuming page (h2/h3 headings from the
// markdown content, excluding ... blocks).
import Subheader from '@ui/Subheader.astro'
import Icon from '@ui/Icon.astro'
export interface TocItem {
/** 2 or 3 (h2/h3); h3 gets the ms-3 indent */
level: number
text: string
/** anchor without '#', e.g. "default-markup" */
id: string
}
interface Props {
toc?: TocItem[]
/** "Edit this page" URL on GitHub; omitted for pages without a source file */
editUrl?: string | undefined
/** URL of the file implementing the component, from the page's `source` front matter */
sourceUrl?: string | undefined
/** url of this page's markdown mirror, offered as a copy button */
markdownUrl?: string | undefined
}
const { toc = [], editUrl, sourceUrl, markdownUrl } = Astro.props
// shared/data/illustrations.json has 125 entries.
const illustrationsCount = 125
---
{
toc.length > 0 && (
On this page
)
}