DocsPage
A docs page with a table of contents, breadcrumb and previous/next links.
Installation
Usage
Use it inside DocsLayout. DocsBody adds the docs-typeset class.
Props
| Prop | Type | Description |
|---|---|---|
toc | TOCItemType[] | The page's headings, usually page.data.toc. |
full | boolean | Use the full width and hide the desktop TOC. |
tableOfContent | { enabled?, single?, header?, footer?, container?, list? } | The TOC beside the page on wide screens. single: true highlights one heading at a time. |
tableOfContentPopover | { enabled?, header?, footer?, ... } | The TOC popover at the top of the page on smaller screens. |
breadcrumb | { enabled?, includeRoot?, includePage?, includeSeparator? } | The breadcrumb above the page, on shadcn/ui breadcrumb. |
footer | { enabled?, items? } | Previous and next page links, taken from the page tree unless you pass items. |
The rest are passed to the page's <article>.
Other exports
EditOnGitHub: a link button, e.g.<EditOnGitHub href="https://github.com/…/edit/main/content/docs/index.mdx" />.PageLastUpdate: showsLast updated on <date>in the reader's locale, from adateprop.PageBreadcrumbandPageFooter: the breadcrumb and footer on their own.MarkdownCopyButtonandViewOptionsPopover: the page actions.useDocsPage(): returns{ full }.