图形视图
所有页面的图表。
安装
🌐 Installation
你可以通过命令行安装这个:
🌐 You can install this from CLI:
npx @fumadocs/cli add graph-view在 Fumadocs MDX 上启用 extractLinkReferences。
🌐 Enable extractLinkReferences on Fumadocs MDX.
import { defineDocs } from 'fumadocs-mdx/config';
export const docs = defineDocs({
docs: {
postprocess: {
extractLinkReferences: true,
},
},
});使用
🌐 Usage
你可以在 MDX 文件或布局组件中使用它(例如在 page.tsx 中):
🌐 You can use it in MDX files or the layout components (e.g. in page.tsx):
import { GraphView } from '@/components/graph-view';
import { buildGraph } from '@/lib/build-graph';
export function PageBody() {
return (
<div>
<GraphView graph={buildGraph()} />
</div>
);
}Last updated on
