Manual Installation
Create a new fumadocs project from scratch.
Make sure to read the Quick Start guide first.
Getting Started
Create a new Next.js application with create-next-app
, and install required packages.
Content Source
You can choose a content source you prefer.
There is a list of supported sources:
You have to configure the library correctly following their setup guide before continuing.
Make sure to create a source.ts
file for content adapters, this allows Fumadocs to interact with your content source through a unified interface.
Root Layout
Wrap the entire application inside Root Provider, and add required styles to body
.
Styles
Setup Tailwind CSS on your Next.js app, and add the official Tailwind CSS plugin.
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.
It may vary depending on your content source. You should configure static rendering with generateStaticParams
and metadata with generateMetadata
.
Search
Use the default document search based on Orama.
Learn more about Document Search.
Done
You can start the dev server and create MDX files.
Content
See the docs of your content source (e.g. Fumadocs MDX) to customise how content are processed.
Routing
See Organizing Pages for customising routing.
Other Pages
You can use Home Layout for other pages of the site. It includes the theme toggle and global navigation links.
Last updated on