docs: regenerate snippets into docs/web/snippets

The documented command wrote to docs/snippets, the generator's default from
the old repository layout, so it created new files instead of updating the
modules the pages import, and it covered only the Python examples. Name all
three example folders and the output directory. A few modules currently
regenerate with unrelated changes, so say to review the diff.
This commit is contained in:
Brendan Clement
2026-10-06 12:16:40 -07:00
parent a2c55890db
commit 5546ced68d
+5 -2
View File
@@ -98,12 +98,15 @@ Two things to know before editing:
**Code examples are not written into the pages.** They live in real tests under
`docs/web-tests/{py,ts,rs}`, are extracted into `docs/web/snippets/`, and are
imported by the pages. Edit the test, then regenerate:
imported by the pages. Edit the test, then regenerate from the repository root:
```bash
uv run docs/web-tests/mdx_snippets_gen.py -s docs/web-tests/py
uv run docs/web-tests/mdx_snippets_gen.py -s docs/web-tests/py -s docs/web-tests/ts -s docs/web-tests/rs -o docs/web/snippets
```
Review the diff before committing: a few modules currently regenerate with
unrelated changes, so commit only the snippets for the examples you changed.
An example that stops compiling fails the pull request that broke it.
**Every heading carries an explicit `{#anchor}`.** Those anchors are how the