Improve the docs

3 min·Assumes: nothing

This site is a Markless app in website/, and every page is one file you can open, change and preview.

pnpm install
pnpm docs:dev

pnpm install sets up the repo once, and pnpm docs:dev serves the site at the address it prints. Edit a page and it updates as you save.

Any size of help counts

A fixed typo is welcome. So is a clearer sentence, a missing example, or a whole new figure. You don't need to know Markless well; if a page confused you, that's exactly the page to fix.

Readers come here to see how things work

People already get text answers from AI. They open the docs to see the idea move. So every idea gets a picture they can play with, and only a few words around it.

A page's path is its address

A page file is an .mdx file in website/pages/. Move state.mdx, or click it to rename it:

website/
/concepts/state

/concepts/state

A new page also needs an entry in website/nav.ts.

Every page has the same shape

Open pages/start/reading-tsrx.mdx beside your page and match it:

  • a plain title, then a subtitle that says what the thing is
  • a small, real example first, with its parts in bold
  • headings that state an idea, not "Overview"
  • a <Code> block the reader can change and break

Press CC to see a textbook column, one of the visuals a page can use:

video.app/watch

Subtitles: off

2 spots on this sheet

  1. {subtitles ? 'on' : 'off'}the status, rewritten on each press
  2. onClickthe handler that flips it

The handler ran 0 times. The rest of the sheet never changed.

A good figure plays

Hover each sketch, then click the knight:

Two pen-and-ink sketches. On the left, a corner of a chess board with two pawns and a knight; clicking the knight makes it hop. It is labelled plays, real object. On the right, the boarding pass once drawn for CI, with PASSED stamps that stand for checks. It is labelled a metaphor to decode.

The chess board is a real object you can move. The boarding pass made readers decode stamps first, so it was redrawn. See the real chess figure on Resuming.

  • One idea

    One belief per figure, and two or three objects to show it.

  • The real thing

    Draw the editor, terminal or page itself when one exists. No counters.

  • Playable

    Hover, drag, keys and touch all answer, with one small surprise that teaches.

  • Words under it

    Captions sit under the drawing, never on it. A reader gets it in two seconds.

Before you draw, write four lines: what the reader must believe, the objects, the one action and what changes, and the wrong idea it prevents. The markless-anatomy skill in .ruler/skills/ has the full recipe.

Write like you're talking to a friend

  • Plain words, short sentences, and "you".
  • Define a word the first time you use it.
  • No error codes in sentences; a live example shows them.
  • Cards or a short list, not a table, unless it's a lookup grid.

Spotted a missing picture?

Open an issue, even if you can't draw it. Paste these four lines and fill them in:

Page:      /concepts/computed
Believe:   the total follows the price without being told
Objects:   a price tag and a receipt
Change:    drag the price; only the total moves

Preview, then open a pull request

Check your page in light and dark, wide and phone-sized. Then run the checks:

pnpm --dir website run typecheck
pnpm ci:local --fast

Open a pull request. Macroscope, the review bot, leaves its findings; answer each one. When the checks are green, it joins the merge queue. Your first PR walks through it.