Docs Page
A page in your documentation
Page is the base element of a documentation, it includes Table of contents, Footer, and Breadcrumb.
Usage
Good to know
Instead of rendering the title with DocsTitle
in page.tsx
, you can put the title into MDX file.
This will render the title in the MDX body.
Body
It applies the Typography styles, wrap your content inside.
Edit on GitHub
You can also add your own component.
Configurations
Full Mode
To extend the page to fill up all available space, pass full
to the page component.
This will force TOC to be shown as a popover.
Table of Contents
An overview of all the headings in your article, it requires an array of headings.
For Markdown and MDX documents, You can obtain it using the TOC Utility. Content sources like Fumadocs MDX offer this out-of-the-box.
You can customise or disable it with the tableOfContent
option, or with tableOfContentPopover
on smaller devices.
Prop | Type | Default |
---|---|---|
style? | "normal" | "clerk" | 'normal' |
component? | ReactNode | - |
enabled? | boolean | - |
single? | boolean | true |
footer? | ReactNode | - |
header? | ReactNode | - |
Style
You can choose another style for TOC, like clerk
inspired by https://clerk.com:
Last Updated Time
Display last updated time of the page.
Since you might have different version controls (e.g. Github) or it's from remote sources like Sanity, Fumadocs UI doesn't display the last updated time by default.
For Github hosted documents, you can use
the getGithubLastEdit
utility.
Or you may specify the updated time in frontmatter.
Footer
Footer is a navigation element that has two buttons to jump to the next and previous pages. When not specified, it shows the neighbour pages found from page tree.
Customise the footer with the footer
option.
Prop | Type | Default |
---|---|---|
items? | { previous?: Item | undefined; next?: Item | undefined; } | - |
component? | ReactNode | - |
enabled? | boolean | - |
Breadcrumb
A navigation element, shown only when user is navigating in folders.
Prop | Type | Default |
---|---|---|
includeSeparator? | boolean | false |
includePage? | boolean | true |
includeRoot? | boolean | { url: string; } | false |
component? | ReactNode | - |
enabled? | boolean | - |
full? | boolean | false |
How is this guide?