旧模板文档
主页布局
其他页面的共享布局
Historical Fumadocs template
旧模板文档为历史链接保留,内容不作为当前 ClaudeSkills 产品指南。
这里保留既有编辑译文;如有最新完整官方参考,会在下方独立提供英文原文。
本页目录
使用方法
在其他页面上添加导航栏和搜索对话框。
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { baseOptions } from '@/app/layout.config';
import type { ReactNode } from 'react';
export default function Layout({ children }: { children: ReactNode }) {
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
}
创建一个路由组来在多个页面之间共享相同的布局。
-
(home)/-
page.tsx -
layout.tsx
-
-
/docs/-
[[..slugs]]/page.tsx
-
layout.tsx
-