This documentation site
docs-site/ is a standalone Next.js app with its own package.json, lockfile and Vercel project, deployed at docs.antmejia.com . It shares no code with the portfolio.
Dependencies
| Package | What it does here |
|---|---|
nextra, nextra-theme-docs | The docs framework and theme. Pages are MDX files in content/, and sidebar order and titles come from _meta.js files |
next, react, react-dom | The same versions as the portfolio. Builds with Turbopack, since the docs site has no webpack config |
pagefind | Builds the search index from the exported HTML in out/ after next build (postbuild, scripts/postbuild.mjs). Search runs in the browser against that index; there is no search service |
playwright | Browser tests for search, pnpm test:search, including visual snapshots |
axe-core | Automated accessibility checks inside those browser tests |
typescript, @types/node, @types/react | Types for the components in components/ and the config in app/ |
zod is not a direct dependency. Nextra needs it, and pnpm.overrides pins it to 4.1.12 because Nextra 4.6 breaks on newer versions. Renovate is told to leave that pin alone.
How content is built
- Pages.
content/*.mdxand thecontent/stack/section are written by hand. - Reference.
scripts/sync-reference-docs.mjscopies the repository’sdocs/*.mdguides intocontent/reference/before everydevandbuild(predev,prebuild). The folder is generated and gitignored, so edit the files indocs/. Guides are compiled as plain Markdown, so a{or<in one cannot break the build. - Search.
pnpm buildends by indexing the rendered HTML with Pagefind. Rebuild after changing content to refresh search. See Documentation search. - Fonts. Atomic Serif for headings, loaded from the portfolio’s own font file, Google Sans for body text and Saira for display text, through
next/font.
Tests
pnpm test runs the Node tests in scripts/*.test.mjs: the reference sync, the search URL helpers, the crawl policy and the Vercel ignore script. pnpm test:search needs a production build and a Chromium install, and is covered in Documentation search.
Deploying
The docs project builds from the production branch only, and only when docs-site/, docs/ or src/assets/fonts/ changed since the last deployed commit (scripts/vercel-ignore.sh). The fonts count because the docs layout loads the portfolio’s Atomic Serif file. A pull request that touches either runs the docs build and the search tests in CI. Setting DOCS_BASE_PATH mounts the site under a path such as /docs; it must start with / and have no trailing slash.
The site is a static export (output: "export" in next.config.mjs), and vercel.json sets framework: null, outputDirectory: "out" and cleanUrls: true, so Vercel serves out/ as plain static files. This is deliberate. For Next 16, Vercel’s build adapter moves prerendered pages out of .next/server/app and copies the output before postbuild runs, so indexing .next found no HTML (v1.6.0, Found 0 files matching **/*.{html}) and an index written afterwards never reached the deployment. pnpm start runs scripts/serve-out.mjs, which serves out/ the way Vercel does, because next start cannot serve an export.