Skip to main content

Writing docs

Run .\vesper docs and edit files in docs/docs/; the page reloads as you save. Run .\vesper docs-build before pushing, because it fails on broken links.

When to update docs​

In the same PR as the change, whenever you:

  • add or change a .\vesper command, env variable or setup step
  • change the schema or a convention (naming, API shapes, migrations)
  • make a decision someone will later ask "why?" about: write an ADR

Conventions​

  • One topic per page. Folders become sidebar sections, with order set by _category_.json and sidebar_position.
  • Lead with what the reader does or needs to know, then the detail.
  • Use relative links to .md files (../backend/database.md) so broken links fail the build.
  • Diagrams go in fenced mermaid blocks, so they stay as editable text.
  • Mark anything not built yet with a :::caution[Status: proposal] admonition.

AI assistants​

The root CLAUDE.md tells Claude Code (and similar tools) to read these docs before working in an area. Keeping them current makes those tools follow our conventions instead of guessing.

Publishing​

Cloudflare Pages publishes the site (ADR 0003). Merging to main updates https://vesper-docs.pages.dev within a few minutes, and every other pushed branch gets its own preview URL, which Cloudflare posts on the PR. Only pushes that change files under docs/ trigger a build; backend and app changes don't. If a deploy fails, the build log is under Workers & Pages → vesper-docs → Deployments in the Cloudflare dashboard. Run .\vesper docs-build first and most failures never get that far.

The Pages project uses these build settings:

SettingValue
Production branchmain
Root directorydocs
Build commandnpm ci && npm run build
Build output directorybuild
Node versionNODE_VERSION=22 (matches docs/.node-version)
Build watch pathsdocs/*