On this page

Getting started

Scaffold a new Fumadocs site with Mantine UI using create-fumandocs

The fastest way to start is the create-fumandocs CLI. It generates a Next.js app with Fumadocs MDX, local search, and Mantine wired as the UI layer.

Create a project#

npx create-fumandocs my-docs
cd my-docs
git init          # the CLI does not create a repository
npm install       # if you skipped the install prompt
npm run dev

Open http://localhost:3000/docs.

Prompts#

With no flags, the CLI asks for:

  • Modules: docs (selected by default) and/or blog.
  • Site title: used for the logo wordmark and metadata; defaults to the project name.
  • Site description: metadata and footer copy; defaults to "Built with Fumadocs and Mantine".
  • Site URL: must be an http(s) URL; defaults to https://example.com.
  • Package manager: npm, pnpm, yarn, or bun, with the detected manager as the default.
  • Install dependencies: defaults to yes.

Options#

FlagDescription
--modules <list>Modules: docs, blog (default: docs)
--title <text>Site title, defaults to the project name
--description <text>Site description
--url <url>Public site URL, defaults to https://example.com
--installInstall dependencies without asking
--pm <name>Package manager: npm, pnpm, yarn, or bun

Each prompt except the project name has a matching flag; the project name is the positional argument, and passing a flag skips its prompt.

Selecting neither module exits without writing anything. In CI (CI=1) the CLI skips all prompts and scaffolds my-docs with the docs module, the project-name title, default description and URL, and the detected package manager, without installing dependencies.

Environment#

The scaffold writes .env.example:

NEXT_PUBLIC_SITE_URL=https://example.com

# Optional: your repository, used by the GitHub links.
NEXT_PUBLIC_REPO_URL=

Copy it to .env.local and fill in your values. NEXT_PUBLIC_SITE_URL feeds robots.ts and sitemap.ts; when NEXT_PUBLIC_REPO_URL is empty, the GitHub links are hidden. Without a site URL the app falls back to http://localhost:3000.

What gets generated#

PathPurpose
app/layout.tsxMantine color scheme and RootProvider
app/global.cssMantine + fumandocs-ui styles
app/page.tsxStarter landing page
app/robots.tsRobots file driven by the site URL
app/sitemap.tsSitemap driven by the site URL
lib/site.tsSite URL, description, and repository URL
lib/source.tsFumadocs content source
components/mdx.tsxDefault MDX component map
next.config.mjsFumadocs MDX plugin and Shiki themes
.env.exampleSite URL and repository URL

The docs module adds app/docs/, app/api/search/route.ts, app/llms.mdx/, and content/docs/.

The blog module adds app/blog/ (post list and post pages), app/llms.mdx/blog/, content/blog/, lib/blog.ts, and components/blog/. Posts reuse the docs page primitives, so they get the table of contents and Markdown actions; the list is also served as RSS at /blog/rss.xml.

Imports#

Generated apps depend on fumandocs-ui directly:

{
  "dependencies": {
    "fumandocs-ui": "^0.3.0"
  }
}

Use fumandocs-ui/layouts/docs, fumandocs-ui/mdx, and fumandocs-ui/provider/next. When you follow fumadocs.dev, replace fumadocs-ui with fumandocs-ui in import paths.