Skip to content
Kevin Liu's WikiSearch

Bundle Wiki Prebuild

Portable build quickref for copying the parent wiki/ tree into ui/.content/wiki so the Vercel reader can load markdown at runtime.

Open this page when the wiki UI build cannot find markdown, when Vercel deploys from ui/, or when content appears stale in the deployed reader. Architecture context: Kevin Wiki UI Architecture.

Why It Exists

When Vercel's root directory is ui, ../wiki is not present in the serverless deployment filesystem. The prebuild step embeds the wiki tree into .content/wiki so runtime loaders can read the content without reaching outside the deployment bundle.

The same rule applies to instruction/docs files that routes expose as agent docs. ui/scripts/bundle-wiki.mjs copies the docs one checked-in list names, ui/src/lib/agent-doc-list.json, into ui/.content and writes agent-doc-sources.json, so deployed routes never reach back to /vercel/path0/*.md at runtime or during tracing. It follows nothing a doc mentions, and it fails, naming the entry, on a private, misplaced or symlinked doc.

Contract

Environment Wiki source
Local dev Live ../wiki unless WIKI_DIR overrides.
Production / Vercel Bundled ui/.content/wiki copied during prebuild.
Override WIKI_DIR points the reader at an alternate wiki root.

Checklist

  1. Confirm ui/package.json runs node scripts/bundle-wiki.mjs as prebuild.
  2. Confirm Vercel project root is ui.
  3. Confirm next.config.ts traces .content/**/*.
  4. Confirm root *.md files and referenced instruction docs are allowlisted in root .vercelignore.
  5. Rebuild after wiki changes before deploying reader content.
  6. Pair with Password Gate Setup and Public Categories Env for visibility/privacy.

Timeline