The drawDB documentation site is built with Fumadocs, Next.js, Tailwind CSS, and a static Orama search index.
- Node.js 22.12 or newer
- npm 10 or newer
If you use nvm, run:
nvm useInstall dependencies and start the development server:
npm install
npm run devOpen http://localhost:3000. Local development uses no URL prefix, so pages appear at routes such as /create-diagram.
npm run check
npm run build
npm run startnpm run build writes the fully static site to out/. The production preview command serves that directory locally.
| Variable | Purpose | Local default |
|---|---|---|
NEXT_PUBLIC_SITE_URL |
Canonical public URL used by metadata, sitemap, robots, and social cards. | https://drawdb-io.github.io/docs |
NEXT_PUBLIC_BASE_PATH |
Path where the static site is mounted. Use an empty value for a root domain. | Empty |
For this repository's GitHub Pages deployment, the workflow builds with:
NEXT_PUBLIC_SITE_URL=https://drawdb-io.github.io/docs
NEXT_PUBLIC_BASE_PATH=/docs
For a custom domain such as https://docs.drawdb.app, set NEXT_PUBLIC_SITE_URL to that origin and leave NEXT_PUBLIC_BASE_PATH empty.
- Documentation pages live in
docs/**/*.mdx. - Sidebar order is controlled by the root and nested
meta.jsonfiles. - Pro product guides live in
docs/pro/; add new Pro pages todocs/pro/meta.json. - Light and dark screenshots live in
docs/img/lightanddocs/img/dark. - Every page should have a unique
titleanddescriptionin its frontmatter. - JSX-enabled content must use the
.mdxextension.
Fumadocs provides Cards, Card, and Callout automatically. This project also registers Accordion, Accordions, and ThemedImage as global MDX components.
Search uses a static Orama index generated during the build. It requires no hosted search service or API key. The index is exported at /api/search and the UI supports the standard search button and Command/Ctrl + K.
The build generates:
- Unique page titles, descriptions, canonical URLs, Open Graph, and X metadata
sitemap.xmlrobots.txtmanifest.webmanifest- Breadcrumb structured data
llms.txtandllms-full.txt
Update NEXT_PUBLIC_SITE_URL before deploying to a different domain so these URLs remain canonical.
The workflow in .github/workflows/deploy.yml builds and deploys on pushes to main.
In the GitHub repository:
- Open Settings → Pages.
- Set Build and deployment → Source to GitHub Actions.
- Push to
mainor run the workflow manually.
The workflow uses Node.js 22, installs from package-lock.json, builds with the /docs base path, and publishes out/.