prmbr-image-mksaas/content/docs/layouts/home-layout.mdx
javayhu 16aaf55a91 refactor: enhance documentation feature and update dependencies
- Updated content collections to include new schemas for better document handling.
- Added new documentation files for comparisons, customization, and internationalization.
- Introduced a manual installation guide and improved markdown support.
- Updated package.json with new dependencies for enhanced functionality.
- Added new images for documentation and improved layout components for better user experience.
- Adjusted TypeScript configurations for better path management.
2025-03-30 22:34:16 +08:00

34 lines
880 B
Plaintext

---
title: Home Layout
description: Shared layout for other pages
---
## Usage
Add a navbar and search dialog across other pages.
```tsx title="/app/(home)/layout.tsx"
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>;
}
```
Create a [Route Group](https://nextjs.org/docs/app/building-your-application/routing/route-groups) to share the same layout across multiple pages.
<Files>
<Folder name="(home)" defaultOpen>
<File name="page.tsx" />
<File name="layout.tsx" />
</Folder>
<Folder name="/docs">
<Folder name={'[[..slugs]]'}>
<File name="page.tsx" />
</Folder>
<File name="layout.tsx" />
</Folder>
</Files>