Skip to Content
agore-skill
Reference

Docs stack

The Fumadocs app under docs/ — files, commands, and how content becomes routes.

Stack

LayerChoice
FrameworkNext.js 16.4.6 (App Router)
DocsFumadocs: fumadocs-core 16.19.10, fumadocs-ui (@fumadocs/base-ui), fumadocs-mdx 15.6.5
StylingTailwind CSS v4, shadcn/ui (components.json) and Magic UI components
LanguageTypeScript (strict), React 19
Package managerpnpm (10.32.1, pinned by mise.toml)

Commands

pnpm --dir docs install     # dependencies from the lockfile
pnpm --dir docs dev         # dev server on :3000
pnpm --dir docs types:check # next typegen && tsc --noEmit
pnpm --dir docs build       # production build (also type-checks)
pnpm --dir docs start       # serve the production build
mise run docs:build         # same build via mise

File map

PathRole
docs/content/docs/{en,zh}/MDX content, mirrored per locale
docs/lib/source.tsdefineDocs + loader() wiring (content → source)
docs/lib/i18n.tsLocale list, parser: 'dir', hideLocale: 'never'
docs/lib/layout.shared.tsxbaseOptions(locale) and the global UI translation strings
docs/lib/shared.tsApp name, git config, install command, OG image URL helper
docs/app/(entry)/The language chooser at /
docs/app/[lang]/layout.tsxRoot layout: html lang, RootProvider with the i18n provider
docs/app/[lang]/(home)/The landing page
docs/app/[lang]/docs/The docs layout (sidebar + tabs) and the [[...slug]] catch-all page
docs/app/api/search/route.tsSearch API (createFromSource), pre-rendered to a static index
docs/app/og/docs/[lang]/[...slug]/OG image generation per locale
docs/app/llms.txt, llms-full.txt, llms.mdx/Agent-facing Markdown endpoints
docs/next.config.mjsMDX integration + output: 'export' (static build into out/)
docs/scripts/postbuild-export.mjsPublishes the /<lang>/docs/**.md URLs as static files after the build

How content becomes routes

  1. fumadocs-mdx compiles content/docs/** (frontmatter via pageSchema, navigation via metaSchema).
  2. loader() in lib/source.ts applies the i18n config: files under content/docs/<locale>/… are grouped per locale, slugs exclude the locale folder, and page URLs become /<locale>/docs/<slugs>.
  3. Root folders (user, contributor, both "root": true) build two page trees — one per section — rendered as the docs layout's top-level tabs.
  4. app/[lang]/docs/[[...slug]]/page.tsx looks pages up with source.getPage(params.slug, params.lang) and renders the MDX body, with createRelativeLink(source, page) resolving relative .mdx links inside the current locale.
  5. Static generation comes from source.generateParams() (slug × locale) plus generateStaticParams in the landing and chooser pages.

Agent-facing surfaces

  • GET /llms.txt, /llms-full.txt — index and full text, both locales.
  • GET /<lang>/docs/<path>.md — the Markdown of one page, published as a static file by scripts/postbuild-export.mjs. (The former Accept: markdown negotiation for extensionless URLs was dropped with the static export — clients should append .md to the page URL.)

On this page