Quick Start
Getting Started with Fumadocs
Using an AI agent?
Copy the setup instructions into your agent (Claude Code, Cursor, Codex, etc.), it will follow the recommended way to set up a docs site.
Introduction
Fumadocs (Foo-ma docs) is a documentation framework, designed to be fast, flexible, and composes seamlessly into your React framework. It consists of multiple layers:
Fumadocs Core
Handles most of the logic, including document search, content source adapters, and Markdown extensions.
Fumadocs UI
The default theme of Fumadocs offers a beautiful look for documentation sites and interactive components.
Content Source
The source of your content, can be a CMS or local data layers like Fumadocs MDX (the official content source).
Fumadocs CLI
A command line tool to install UI components and automate things, useful for customizing layouts.
Want to learn more?
Read our in-depth What is Fumadocs introduction.
Terminology
Markdown/MDX: Markdown is a markup language for creating formatted text. Fumadocs natively supports Markdown and MDX (superset of Markdown).
Bun: A JavaScript runtime, it will be used in our guides for running scripts. If you prefer Node.js, try unrun instead.
Some basic knowledge of React.js would be useful for further customizations.
Automatic Installation
A minimum version of Node.js 22 required.
npm create fumadocs-appIt will ask you the built-in template to use:
- Framework: Next.js, React Router, TanStack Start, Waku and Astro.
- Content source: Fumadocs MDX, or Astro content collections.
A new fumadocs app should be initialized, with following features configured by default:
From Existing Codebase?
You can follow the Manual Installation guide to get started.
Enjoy!
Create your first MDX file in the docs folder.
---
title: Hello World
---
## Yo what's upRun the app in development mode:
npm run devOpen http://localhost:3000/docs to see your page.
FAQ
Some common questions you may encounter.
Make sure to upgrade Fumadocs when you've encountered any problems or trying out new features:
pnpm update -i -r --latestRouting is handled by Waku. Move the docs route first (/docs/* -> /info/*).
Move src/pages/docs to src/pages/info.
Finally, update the base URL of pages in source.ts:
import { loader } from 'fumadocs-core/source';
export const source = loader({
baseUrl: '/info', // to the new value
});The templates define this value as docsRoute in lib/shared.ts, change it there so Markdown links follow.
We recommend using Layout Tabs.
There's some weird pre-bundling problems with Vite: #3910.
Make sure to exclude Fumadocs from pre-bundling and add it to noExternal:
import { defineConfig } from 'vite';
export default defineConfig({
resolve: {
// add other Fumadocs deps as needed
noExternal: ['fumadocs-core', 'fumadocs-ui', 'fumadocs-openapi', '@fumadocs/base-ui'],
},
});Learn More
New to here? Don't worry, we are welcome for your questions.
If you find anything confusing, please give your feedback on Github Discussion!
Writing Content
For authoring docs, make sure to read:
Markdown
Fumadocs has some additional features for authoring content.
Navigation
Learn how to customize navigation structure.
Page Slugs & Page Tree
Learn how to organise content.
Components
See all available components to enhance your docs
Special Needs
How is this guide?
Last updated on
