Tutorials
Docs local development
Run the Fumadocs site in dev mode, type-check it, and produce its production build.
In this tutorial we get the documentation site running on your workstation, verify it type-checks, and produce the same production build CI uses.
What we are building towards
pnpm --dir docs dev # http://localhost:3000
pnpm --dir docs build # green production buildPrerequisites
- Node 24 and pnpm 10.32.1, both pinned by
mise.toml— entering the repository activates them (mise run setupinstalls the docs dependency graph;mise run docs:installdoes that step alone).
Run the dev server
pnpm --dir docs devOpen http://localhost:3000: the language chooser.
From there, /en and /zh lead to the landing pages and
/en/docs, /zh/docs to the documentation. MDX edits hot-reload; changes
to lib/ or app/ reload the whole server.
Type-check without building
pnpm --dir docs types:checkThis runs next typegen && tsc --noEmit — faster feedback than a full
build when you only touched TSX/TS.
Produce the production build
pnpm --dir docs buildThe production build type-checks, generates static pages for every locale
and route, and is what the docs CI job and mise run docs:build run.
Serve the result with pnpm --dir docs start.
Where things live
| Path | What it is |
|---|---|
docs/content/docs/ | MDX content, split into en/ and zh/ mirrors |
docs/lib/source.ts | The content loader (loader() + i18n config) |
docs/lib/i18n.ts | The locale list and parser mode |
docs/lib/layout.shared.tsx | Nav options and the UI translation strings |
docs/app/[lang]/ | Landing page, docs layout, docs catch-all page |
docs/app/(entry)/ | The language chooser at / |
Conventions for editing content
- Never mix types in one page; the Diátaxis rules in the docs conventions apply.
- Reference content must mirror the implementation — verify facts by running the CLI, never write from memory.
- Keep
en/andzh/structurally identical (same file paths, same meta structure); see How to translate the docs.
Next steps
- Add a page: How to extend the docs.
- What the stack is and why: Docs stack reference.