Manual Installation
Add Fumadocs to existing projects.
Before continuing, make sure:
- Next.js 15 and Tailwind CSS 4 are configured.
Getting Started
MDX Components
Content Source
Fumadocs supports different content sources, including Fumadocs MDX and Content Collections.
Fumadocs MDX is our official content source, you can configure it with:
Add a postinstall
script to generate types:
Finally, to access your content:
Styles
Add the following to global.css
.
It doesn't come with a default font, you may choose one from next/font
.
Layout
Create a app/layout.config.tsx
file to put the shared options for our layouts.
Create a folder /app/docs
for our docs, and give it a proper layout.
pageTree
refers to Page Tree, it should be provided by your content source.
Page
Create a catch-all route /app/docs/[[...slug]]
for docs pages.
In the page, wrap your content in the Page component.
Search
Use the default document search based on Orama.
Learn more about Document Search.
Deploying
It should work out-of-the-box with Vercel & Netlify.
Docker Deployment
If you want to deploy your Fumadocs app using Docker with Fumadocs MDX configured, make sure to add the source.config.ts
file to the WORKDIR
in the Dockerfile.
The following snippet is taken from the official Next.js Dockerfile Example:
This ensures Fumadocs MDX can access your configuration file during builds.
How is this guide?