Migrate docs from Nextra to Vocs 2#155
Conversation
- Replace Nextra/Next.js with Vocs 2.0.11 (vite 8, waku, pnpm) - Move pages to docs/pages/, assets to docs/public/ - Convert Nextra callouts/steps to vocs directives - Add system dark mode toggle and MCP/AI integration - Remove old Nextra app/, components/, public/, configs
🚀 Live demo deploymentThe Vocs 2 site from this branch is deployed on Cloudflare Pages: Site: https://eden-docs.pages.dev Everything is verified working:
Try it: # add to Claude Code
claude mcp add --transport http eden-docs https://eden-docs.pages.dev/mcp# or poke it directly
curl -s -X POST https://eden-docs.pages.dev/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_docs","arguments":{"query":"bridge"}}}'🤖 Generated with Claude Code |
📦 How deployment works after mergeTwo workflows fire on every push to
GitHub Pages needs no new setup (same Pages-via-Actions flow as before). The Cloudflare workflow needs two repo secrets (Settings → Secrets and variables → Actions):
Until the secrets are set, manual deploys work from a checkout: Moving to a different Cloudflare account later (e.g. a Celestia-owned one): 🤖 Generated with Claude Code |
Retire the GitHub Pages deploy: it duplicated the full site at a second origin, needed the BASE_PATH subpath build, and its "Copy MCP URL" button pointed cross-origin. Cloudflare Pages serves the full-static vocs build plus the MCP endpoint (worker/index.js as _worker.js) from eden-docs.pages.dev. - Delete deploy.yml; drop BASE_PATH/BASE_URL plumbing from vocs.config.ts - deploy-cloudflare.yml: deploy production on pushes to main, Pages previews (<branch>.eden-docs.pages.dev) on pull requests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploy consolidation: Cloudflare Pages only (3031f15)What changed
Verified on this PR's previewThe
Merging to Known follow-ups (non-blocking)
🤖 Generated with Claude Code |
Summary
Migrates the docs site from Nextra (Next.js) to Vocs 2 and consolidates deployment onto Cloudflare Pages (site + MCP endpoint on one origin).
Changes
docs/pages/, static assets topublic/at the repo root (vite convention)<Callout>→ vocs:::info/:::warningdirectives,<Steps>→::::steps, FAQ<details>→:::detailsdirectives.mdURLs for every page ("View as Markdown" / AI agents),llms.txt+llms-full.txtapp/,components/,next.config.mjs,postcss.config.mjs,bun.lock; CI standardized on pnpmDeployment (Cloudflare Pages only)
renderStrategy: 'full-static');worker/index.jsis deployed as the Pages_worker.jsto serve a stateless MCP server (Streamable HTTP) at/mcp, passing everything else through to the static assetsdeploy-cloudflare.yml: push tomain→ production; pull requests → preview at<branch>.eden-docs.pages.dev(same-repo branches only)BASE_PATHsubpath build. After merge, disable GitHub Pages in repo settings.CLOUDFLARE_API_TOKEN(account-owned, Pages:Edit only),CLOUDFLARE_ACCOUNT_IDpatches/vocs@2.0.11.patch: mdRouter hardening + "Copy MCP URL" honorsmcp.urlfrom configTesting
pnpm install pnpm dev # http://localhost:5173 pnpm buildDemo
Preview deployed from this branch by the PR workflow:
Production after merge: https://eden-docs.pages.dev/ (MCP at
/mcp)Known follow-ups (non-blocking)
public/robots.txtstill hasDisallow: /— flip when the site should be indexed🤖 Generated with Claude Code