Plan: generate the site from docs/, with docs-kit
Issue: #50, under the epic architecture#3 (one docs-site workflow for every repo, generated from docs/). It builds on architecture#4 (the shared generator, docs-kit) and architecture#5 (MDX pages in docs/, docs-kit v0.2.0). Implemented in #51, on docs-kit v0.2.1.
reflex’s site is generated from docs/, like anatomy’s, racing-drone’s and synapse’s. The documents we write and review live in docs/, where GitHub renders them, and a broken relative link or anchor fails the PR. Nothing is written by hand under docs-site/src/content/.
Design
Section titled “Design”- The pages move to
docs/at the same paths, so every route (/control/pid/, …) stays.docs/index.mdxis the landing page. The 19 MDX pages importTracePlayer, the traces and the figures through docs-kit’s@site/alias (the site’ssrc/) instead of../../../paths. Links written as routes (/control/pid/) become relative links to the documents, so docs-kit checks them. docs/README.mdis the documentation map, one row per sidebar group in today’s order, and within a folder’s row the links in today’s order. “Roadmap” is a top-level document with its own row.- The nested groups come from front matter. Each block’s four pages carry
sidebar.group(for example “PID Controller”) andsidebar.label(Explainer, Developer Guide, V&V Plan, Deployment Guide). The group is listed where its first page would be. - The site code stays in
docs-site/: the components,traces/,schemas/,scripts/trace/*, the figures and their generators, and the WebAssembly build’s output inpublic/wasm/. docs-site/docs-kit.config.mjsholds what docs-kit doesn’t default: the title and description, the “Signal Processing” label fordsp/, the amber accent,math: true(KaTeX, as before),src/styles/custom.css(now only the rule that scrolls wide display math), and the API reference oversdk/include(it replaces theDoxyfile). The package pinsgithub:branes-ai/docs-kit#v0.2.1; Astro, Starlight and KaTeX come with it.- The deploy keeps its own workflow,
deploy-docs.yml, because its build needs Emscripten for the WebAssembly module, and docs-kit’s shared deploy can’t add a toolchain. It runs the site’snpm run apiandnpm run build, and now also triggers ondocs/**. - CI: the
Docs tracesjob already builds the site; it now runsnpm run checkafter the build, which checks every link and anchor in it. docs/sessions/is not published (unpublishedin the config), as on synapse: session logs are working records, not documentation. Design notes and assessments, inarch/andassessments/, are published like any folder, with a row in the map.- The records,
docs/plan/anddocs/adr/, are published on the architecture site, which lists reflex in itssources.yaml; this site redirects to them.
Acceptance
Section titled “Acceptance”All four were met on 2026-10-30. On the deployed site, every live widget tried reran its scenario in WebAssembly, every trace player drew, and no page logged an error.
docs-site/src/content/has no committed content; every page comes fromdocs/.- Every route on today’s site still exists, with the same content and the same sidebar order: a comparison of each page’s content in the built
dist/, the sidebar, and a screenshot. - The live widgets and trace players work on the deployed site.
- A broken relative link in
docs/fails the PR.
Departures
Section titled “Departures”- The sidebar gains the “Documentation map” (
/overview/) and a “Plans and decisions” group linking to the architecture site, as on the other sites. - KaTeX’s stylesheet is 0.16.47, the version that renders the math; it was 0.17.0, a mismatch.
standards/building-blocks.mdnames the pages’ new location,docs/<layer>/.