Prefer to add Fumadocs to an existing project? Check out the Installation Guide for manual setup instructions.
Prerequisites
Before you begin, make sure you have:- Node.js 22 or higher installed
- A package manager: npm, pnpm, yarn, or bun
- Basic knowledge of React.js (helpful for customization)
We recommend using pnpm for faster installs and better disk space efficiency, but any package manager will work.
Create Your Project
Run the CLI Tool
Open your terminal and run the create command with your preferred package manager:The CLI will guide you through an interactive setup process.
Choose Your Configuration
The CLI will ask you to configure:Project Name
- Enter a name for your project (e.g.,
my-docs)
- Next.js (recommended) - Full App Router support, SSG, ISR
- Tanstack Start - Modern React framework with server functions
- React Router - Client-side routing with RSC support
- Waku - Minimal React framework for static sites
- Fumadocs MDX (recommended) - Local MDX files with full TypeScript support
- More options available for advanced setups
Install Dependencies
The CLI will automatically install all required dependencies:If you need to install manually:
Start the Development Server
Run the dev command to start your docs site:Your documentation site is now running at http://localhost:3000/docs! 🎉
Project Structure
Here’s what the CLI created for you:This structure follows Next.js 16 conventions. If you chose a different framework, your structure will vary accordingly.
Create Your First Page
Create an MDX File
Create a new file in the The frontmatter (content between
content/docs directory:content/docs/getting-started.mdx
---) defines page metadata:- title: Page title (shown in navigation and browser tab)
- description: Page description (for SEO)
- Additional fields like
icon,index, etc.
View Your Page
Visit http://localhost:3000/docs/getting-started to see your new page.Notice how:
- The page appears in the sidebar navigation automatically
- The title and description are rendered
- The URL matches your file name
Understanding the Configuration
Source Configuration
Thesource.config.ts file configures your content source:
source.config.ts
Source Loader
Thelib/source.ts file creates the content loader:
lib/source.ts
Next Steps
Now that you have a working Fumadocs site, here’s what to explore next:Navigation Structure
Learn how to organize pages and customize navigation
Components
Discover all available UI components for rich content
Markdown Guide
Master MDX syntax and advanced features
Search Setup
Configure document search with Orama, Algolia, or custom providers
Customization
Change the Base URL
By default, docs are at/docs. To change this:
- Rename the route folder (e.g.,
app/docs→app/documentation) - Update
lib/source.ts:
Add a Custom Theme
Fumadocs supports custom color schemes. Editglobal.css:
app/global.css
Install UI Components
Use the Fumadocs CLI to add components to your project:Common Issues
Module not found errors
Module not found errors
Make sure you’ve installed all dependencies:For Vite users, you may need to exclude Fumadocs from pre-bundling:
vite.config.ts
Pages not appearing in navigation
Pages not appearing in navigation
Styles not loading
Styles not loading
Ensure you’ve imported Fumadocs styles in your global CSS:
Build for Production
When you’re ready to deploy:- Static HTML for all pages (SSG)
- Optimized assets and code splitting
- Search index generation
For Next.js, Fumadocs automatically generates static pages using
generateStaticParams. No additional configuration needed!Get Help
Need assistance?- GitHub Discussions: https://github.com/fuma-nama/fumadocs/discussions
- Discord Community: Join our server for real-time help
- Documentation: Search this site for detailed guides