The documentation site for payload-auth, built with
Fumadocs on Next.js.
pnpm install
pnpm dev # http://localhost:3000
pnpm build
pnpm types:check| Path | Contents |
|---|---|
content/docs |
All documentation, as MDX |
src/lib/source.ts |
Content source adapter and the LLM/Markdown URL helpers |
src/lib/shared.ts |
Site name, repo config and route constants |
src/lib/layout.shared.tsx |
Nav and layout options shared by all pages |
src/app/docs |
Docs layout and page renderer |
src/app/(home) |
Landing page |
src/app/api/search |
Search endpoint (built-in, no external service) |
src/proxy.ts |
Markdown content negotiation for docs URLs |
Page order and sidebar grouping come from meta.json files inside content/docs.
Create an .mdx file under content/docs with frontmatter:
---
title: My page
description: One sentence, used in search results and in llms.txt.
---Then add its filename to the pages array of the sibling meta.json.
Components available in MDX without importing: Callout, Card, Cards, Tabs, Tab,
Steps, Step, Accordion, Accordions, TypeTable, and fumadocs' default set.
Fenced blocks tagged package-install render as package-manager tabs.
Icons in frontmatter and meta.json are Lucide names, resolved
against the icons export of lucide-react — an unknown name logs a warning at build time
and renders nothing.
The site publishes its content as Markdown so coding agents can read it directly:
Requesting a docs URL with Accept: text/markdown returns Markdown instead of HTML;
src/proxy.ts handles that rewrite. Each page also renders a Copy Markdown button and
a view-options menu.
vercel.json at the repo root currently sets git.deploymentEnabled: false. Enable it, or
deploy this directory as its own project with docs as the root.
Set NEXT_PUBLIC_SITE_URL to the production origin so OG images and canonical URLs
resolve correctly. It defaults to https://payload-auth.dev.
