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.html | English, default |
topic.zh.html | Chinese, same structure |
Styled by the site.
Components
| Written as | Use 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 as | Use for |
t-big t-soft t-cmd t-no mid | Text |
ln ln-faint ln-acc ln-no | Lines |
head head-no | Arrow heads |
tile gate | Shapes |
Check
| Command | When |
python -m scripts.docs_site.check PATH ... | Before finishing. Fix each error at its file and line. |
… check PATH ... --ack PAGE ... --reason TEXT | An affected page was read and needs no change |
… check --all | Every 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
| Area | What the check cannot judge |
| Facts | Taken from code and command output. No real content, no block. |
| Words | Headings name the thing. Errors say what happened and what to do. One word per concept across the site. |
| Shape | Numbers only for real steps. No eyebrows, coloured side bars, nested cards or all-caps labels. |
| Code | Monospace only for code and arguments, with translate="no". |
| Colour | Through tokens. Accent for links, current state and focus; red only for refusal. Every cell has words. |
| Figures | Still, with an aria-label; they change layout rather than shrink. |
| Motion | No 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