组件
用于改进文档的附加组件
概览
🌐 Overview
你可以使用的其他组件:
🌐 Additional components that you can use:
手风琴
在你的文档中添加手风琴菜单
自动类型表
自动生成的类型表
横幅
在你的网站上添加横幅
代码块
显示 Shiki 高亮代码块
代码块(动态)
一个也能高亮显示代码的代码块
文件
在文档中显示文件结构
GitHub 信息
显示你的 GitHub 仓库信息
图形视图
所有页面的图表。
可缩放图片
允许在文档中放大图片
内联目录
在文档中添加内联目录
步骤
向你的文档添加步骤
标签
一个使用 Radix UI 构建的标签页组件,具有诸如以下的附加功能 persistent and shared value.
类型表
用于记录类型的表格
MDX 组件
🌐 MDX Components
默认的 MDX 组件包括卡片、提示、代码块和标题。
🌐 The default MDX components include Cards, Callouts, Code Blocks and Headings.
import defaultMdxComponents from 'fumadocs-ui/mdx';相对链接
🌐 Relative Link
仅限服务器组件。
要在 href 中支持相对文件路径的链接,请使用以下方法覆盖默认的 a 组件:
🌐 To support links with relative file path in href, override the default a component with:
import { createRelativeLink } from 'fumadocs-ui/mdx';
import { source } from '@/lib/source';
import { getMDXComponents } from '@/mdx-components';
const page = source.getPage(['...']);
return (
<MdxContent
components={getMDXComponents({
// override the `a` tag
a: createRelativeLink(source, page),
})}
/>
);[My Link](./file.mdx)Last updated on
