Logo
  • Home
  • Soul Journal
  • Soul Profile
  • Blog
  • About
  • Pricing
LoginSign Up
LoginSign Up
Home/ブログ/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.

すべての記事

著者

avatar for Mkdirs
Mkdirs

カテゴリー

  • 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

もっと見る

Yes or No Tarot List — A 78-Card Direction Guide
User Guide

Yes or No Tarot List — A 78-Card Direction Guide

Use this Yes or No tarot guide to understand how tarot cards can lean Yes, No, or Maybe. Learn how upright and reversed cards affect directional answers across all 78 cards.

avatar for Orelune
Orelune
2026/03/20
Orelune Tarot Series: The Empress - Nurturing, Abundance & Creative Bloom
Tarot Explained

Orelune Tarot Series: The Empress - Nurturing, Abundance & Creative Bloom

Explore The Empress tarot card on Orelune, including love, abundance, career, money, symbolism, yes/no guidance, and practical reading support.

avatar for Orelune
Orelune
2026/03/24
Orelune Tarot Series: The Lovers - Union, Choice & Heart Alignment
Tarot Explained

Orelune Tarot Series: The Lovers - Union, Choice & Heart Alignment

Explore The Lovers tarot card meaning on Orelune, including relationships, important choices, career alignment, symbolism, and yes or no guidance.

avatar for Orelune
Orelune
2026/03/24

ニュースレター

コミュニティに参加

最新ニュースと更新情報のためにニュースレターを購読してください

LogoOrelune

癒やしと明晰さ、導きをもたらす AI タロットの聖域。

プロダクト

  • 機能
  • 料金
  • よくある質問

リソース

  • ブログ
  • ドキュメント
  • 更新履歴
  • ロードマップ

会社

  • 概要
  • お問い合わせ
  • ウェイトリスト
© 2026 Orelune All Rights Reserved.support@orelune.co
概要お問い合わせ料金利用規約プライバシーポリシークッキーポリシー