Skip to content

Where the Docs Live

Josh Dionne edited this page Aug 25, 2026 · 2 revisions

Generated from the thetowersdk repository. Edits made here are overwritten on the next push — change the source file instead.

Where the Docs Live

Surface What it is Edit it?
thetowersdk website Browsable docs, live demos, runnable examples Generated
This repo The source of truth: this README, docs/, examples/, templates/ Yes
GitHub wiki The same content, page-per-section, for reading on GitHub No — generated

Three surfaces, one source. Everything downstream is rendered from the files in this repository by one command, so there is nothing to remember to update:

npm run docs:seed    # regenerate the wiki pages and the shared code snippets
npm run docs:check   # fail if any of them are stale (runs in `npm run verify`)

The wiki is rendered by scripts/build-wiki.mjs. A GitHub wiki is a separate repository that no pull request reviews, so hand-editing it would create a third docs surface that silently drifts — every page carries a banner saying so, and an edit made there is overwritten on the next push.

Code samples shared with the website come out of scripts/build-doc-snippets.mjs, which extracts marked regions from files that npm run examples:run executes. A hand-copied sample is correct on the day it is pasted and silently wrong afterwards; an extracted one fails in CI before it can reach a page.

// >>> snippet: bot-in-one-line
const bot = createTowerBot({ commands: calculatorCommands() })
// <<< snippet

The link checker is strict on purpose: a relative link that escapes the package root resolves in the authoring monorepo but 404s in the published repo, and it has found live ones.


Clone this wiki locally