Logo
  • Home
  • Soul Journal
  • Soul Profile
  • Blog
  • About
  • Pricing
LoginSign Up
LoginSign Up
Home/Blog/Company
Install Fumadocs Manually
2025/03/14

Install Fumadocs Manually

Build a fresh Fumadocs setup step by step inside a new Next.js project.

Read the Quick Start guide first for basic concept.

Start from a Blank App

Begin with a fresh Next.js project created through create-next-app, then install the packages Fumadocs needs.

fumadocs-ui fumadocs-core

Choose a Content Source

Fumadocs works with multiple content sources, so pick the one that matches your workflow.

Officially supported options include:

  • Setup Fumadocs MDX
  • Setup Content Collections

Before moving on, make sure the source library itself is configured correctly. In this guide, the source adapter is imported from @/lib/source.ts.

Set Up the Root Layout

Wrap the entire app with Root Provider, then give body the minimum layout styling it needs.

import { RootProvider } from 'fumadocs-ui/provider';
import type { ReactNode } from 'react';

export default function Layout({ children }: { children: ReactNode }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body
        // you can use Tailwind CSS too
        style={{
          display: 'flex',
          flexDirection: 'column',
          minHeight: '100vh',
        }}
      >
        <RootProvider>{children}</RootProvider>
      </body>
    </html>
  );
}

Add Styles

Install Tailwind CSS v4 in your Next.js app, then place the following imports in global.css.

Tailwind CSS
@import 'tailwindcss';
@import 'fumadocs-ui/css/neutral.css';
@import 'fumadocs-ui/css/preset.css';

/* path of `fumadocs-ui` relative to the CSS file */
@source '../node_modules/fumadocs-ui/dist/**/*.js';

It doesn't come with a default font, you may choose one from next/font.

Configure Shared Layout Options

Create app/layout.config.tsx to hold the options reused by your layouts.

{
  "file": "../../examples/next-mdx/app/layout.config.tsx",
  "codeblock": {
    "meta": "title=\"app/layout.config.tsx\""
  }
}

Next, create /app/docs and give the docs section its own layout.

{
  "file": "../../examples/next-mdx/app/docs/layout.tsx",
  "codeblock": {
    "meta": "title=\"app/docs/layout.tsx\""
  }
}

pageTree refers to Page Tree, it should be provided by your content source.

Add the Docs Page Route

Create the catch-all route at /app/docs/[[...slug]] to serve documentation pages.

Inside that page, render content with the Page component. The exact implementation depends on the content source you chose, and you should also configure generateStaticParams for static rendering plus generateMetadata for metadata.

{
  "file": "../../examples/next-mdx/app/docs/[[...slug]]/page.tsx",
  "codeblock": {
    "meta": "title=\"app/docs/[[...slug]]/page.tsx\" tab=\"Fumadocs MDX\""
  }
}
{
  "file": "../../examples/content-collections/app/docs/[[...slug]]/page.tsx",
  "codeblock": {
    "meta": "title=\"app/docs/[[...slug]]/page.tsx\" tab=\"Content Collections\""
  }
}

Enable Search

You can use the built-in document search powered by Orama.

{
  "file": "../../examples/next-mdx/app/api/search/route.ts",
  "codeblock": {
    "meta": "title=\"app/api/search/route.ts\" tab=\"Fumadocs MDX\""
  }
}
{
  "file": "../../examples/content-collections/app/api/search/route.ts",
  "codeblock": {
    "meta": "title=\"app/api/search/route.ts\" tab=\"Content Collections\""
  }
}

Read more in Document Search.

Finish Up

At this point you can run the dev server and begin writing MDX files.

content/docs/index.mdx
---
title: Hello World
---

## Introduction

I love Anime.

Further Customization

For other pages on your site, you can use Home Layout, which already includes a navbar and theme toggle.

Deployment

The setup should deploy out of the box to Vercel and Netlify.

Docker Deployment

If you plan to ship a Docker image with Fumadocs MDX configured, remember to copy source.config.ts into the Docker WORKDIR. The snippet below comes from the official Next.js Dockerfile Example:

Dockerfile
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* source.config.ts ./

That way, Fumadocs MDX can still read the configuration file during the build.

All Posts

Author

avatar for Mkdirs
Mkdirs

Categories

  • Company
  • Product
Start from a Blank AppChoose a Content SourceSet Up the Root LayoutAdd StylesConfigure Shared Layout OptionsAdd the Docs Page RouteEnable SearchFinish UpFurther CustomizationDeploymentDocker Deployment

More Posts

Orelune Tarot Series: The Suit of Swords - Clarity, Conflict, and Mental Truth
Tarot Explained

Orelune Tarot Series: The Suit of Swords - Clarity, Conflict, and Mental Truth

Explore the Suit of Swords in tarot with Orelune. Learn the core meanings of thought, communication, conflict, decisions, and truth in the Minor Arcana.

avatar for Orelune
Orelune
2026/03/20
Orelune Tarot Series: Six of Wands - Recognition, Victory, and Earned Confidence
Tarot Explained

Orelune Tarot Series: Six of Wands - Recognition, Victory, and Earned Confidence

Discover the Six of Wands tarot meaning with Orelune, including success, public recognition, love, career, money, symbolism, and straightforward yes/no guidance.

avatar for Orelune
Orelune
2026/04/08
Introducing the Orelune AI Tarot Beta
Product Updates

Introducing the Orelune AI Tarot Beta

Meet the Orelune AI Tarot Beta: a context-aware tarot experience designed to remember readings, recognize patterns, and offer deeper insight over time. Free to explore.

avatar for Orelune
Orelune
2026/03/19

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates

LogoOrelune

치유와 명료함, 길잡이를 전하는 AI 타로의 안식처.

제품

  • 기능
  • 요금제
  • 자주 묻는 질문

리소스

  • 블로그
  • 문서
  • 업데이트 내역
  • 로드맵

회사

  • 소개
  • 문의하기
  • 대기자 명단
© 2026 Orelune All Rights Reserved.support@orelune.co
소개문의하기요금제이용약관개인정보 처리방침쿠키 정책