内联目录
在文档中添加内联目录
Install to your codebase
Easier customisation & control.
使用
🌐 Usage
你可以在你的 MDX 内容中使用它:
🌐 You can use it in your MDX content:
import { InlineTOC } from 'fumadocs-ui/components/inline-toc';
<InlineTOC items={toc}>Table of Contents</InlineTOC>或者把它加到每一页上。
🌐 Or adding it to every page.
import { DocsPage } from 'fumadocs-ui/layouts/docs/page';
import { InlineTOC } from 'fumadocs-ui/components/inline-toc';
export default function Page() {
// ...
return (
<DocsPage>
<InlineTOC items={page.data.toc}>Table of Contents</InlineTOC>
</DocsPage>
);
}参考
🌐 Reference
Prop
Type
Last updated on
