OpenProgram Docs

Writing a docs page

File shape

<title>Writing a docs page</title>
<meta name="description" content="…">
<h1>…</h1>
<figure> … </figure>
<details><summary>…</summary> … </details>
<p class="next"><a href="other.html">…</a></p>
Files
topic.htmlEnglish, default
topic.zh.htmlChinese, same structure

Styled by the site.

Components

Written asUse for
<table class="stack fixed">Lookup table. One block per row when narrow. fixed: two columns, narrow first.
<table class="stack even">Lookup table with equal columns, for several parallel systems
<thead class="sr">Column names read only by screen readers
<span class="arg">Argument line under a command, inside a row heading
<table class="grid">Outcome grid. Cells: run, review, ask, deny.
<dl class="commands">Do and do-not commands. dd.struck strikes one out.
<dl class="pairs">Label and value
<svg class="fig-wide" viewBox="0 0 680 …" aria-label="…">Figure drawn 1:1 on a 680-wide canvas
<ol class="flow fig-narrow">Its twin for narrow columns. Steps: li, li.via, li.flow-end, p.refused.
<details><summary>Rarely needed detail
<p class="note">Small explanation under a figure or table
<p class="next">Next step, last on the page
class="sr"Screen-reader text
class="nb"No line break
Figure classes
Written asUse for
t-big t-soft t-cmd t-no midText
ln ln-faint ln-acc ln-noLines
head head-noArrow heads
tile gateShapes

Check

CommandWhen
python -m scripts.docs_site.check PATH ...Before finishing. Fix each error at its file and line.
… check PATH ... --ack PAGE ... --reason TEXTAn affected page was read and needs no change
… check --allEvery page and the site-wide rules
<meta name="covers" content="openprogram/x/">Names the code a page describes when its text cannot show it
<code data-claim="example">An illustration, or a name that is deliberately absent (old location, rejected option); not checked

Docs governance lists every rule and where it runs.

Rules

AreaWhat the check cannot judge
FactsTaken from code and command output. No real content, no block.
WordsHeadings name the thing. Errors say what happened and what to do. One word per concept across the site.
ShapeNumbers only for real steps. No eyebrows, coloured side bars, nested cards or all-caps labels.
CodeMonospace only for code and arguments, with translate="no".
ColourThrough tokens. Accent for links, current state and focus; red only for refusal. Every cell has words.
FiguresStill, with an aria-label; they change layout rather than shrink.
MotionNo entrance or scroll animation. Hover changes colour only. No sideways page scroll at phone width.

Each page also publishes topic.html.md, generated for Agents: figures once, folds open.

Last updated · 2026-11-25