The Wago documentation site is built with VitePress and published at docs.wago.sh.
- Node.js 22 or newer
- npm 11
npm install
npm run docs:devnpm run docs:build
npm run docs:previewRun the same build and artifact checks used by CI with:
npm ci
npm run docs:checkThe onboarding recordings are generated from the readable source tapes in
demos/. To record them again, install VHS and
gifsicle, make sure an active wago runtime is on your PATH, then run:
npm run docs:demosThe recording script passes each tape through scripts/humanize-tape.py. It
adds reproducible per-letter cadence without making the source tapes hard to
edit, and it leaves hidden setup alone. The optimized GIFs are written to
public/demos/.
Canary documentation lives directly in the repository root. Other rolling
channels and frozen releases live in directories such as nightly/ and
v0.0.0/.
Only edit the canary documentation directly. Successful Wago releases update
versions.json automatically:
- canary records the code release associated with the root documentation;
- nightly snapshots the root into both
nightly/and an immutable commit-keyed source under.docs-snapshots/; - a stable
vMAJOR.MINOR.PATCHrelease promotes the snapshot for the exact same Wago commit into its permanent version directory.
Stable promotion fails if the code commit never received a nightly snapshot.
This prevents a release from silently publishing documentation for different
code. .vitepress/versions.ts reads versions.json, so the version selector,
latest marker, provenance links, search index, sitemap, and LLM exports all move
together.
Pull requests run the production build and artifact verification. A push to
main deploys .vitepress/dist through the protected github-pages
environment. Deployment can also be started manually from the Actions tab.
The release synchronization workflow accepts authenticated code-release
repository dispatches and also reconciles against GitHub Releases every 15
minutes. The scheduled pass is a recovery path if a cross-repository dispatch is
missed.
The site expects the custom domain docs.wago.sh. Configure DNS with a CNAME
record from docs.wago.sh to wago-org.github.io, then enable HTTPS in the
repository's Pages settings after GitHub provisions the certificate.
The build verifier checks every documented version route, the generated sitemap, and the custom-domain marker before an artifact can be deployed.
Every development or production build runs scripts/generate-discovery.mjs.
It derives the following artifacts from the Markdown page tree, so adding or
removing a documentation page updates them automatically:
/sitemap.xmlwith Git-backed modification dates/llms.txtas a concise, categorized documentation map/llms-full.txtas the complete documentation corpus/data/docs.jsonas a structured page and heading index/raw/**/*.mdas clean Markdown mirrors without site navigation
VitePress also adds a canonical URL, Markdown alternate, Open Graph metadata, Twitter card metadata, and Schema.org JSON-LD to every rendered page. The deployment verifier fails if these discovery artifacts drift or disappear.