From 5546ced68d0115659cc0806732edbe0a8d11d496 Mon Sep 17 00:00:00 2001 From: Brendan Clement Date: Tue, 6 Oct 2026 12:16:40 -0700 Subject: [PATCH] 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. --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8de4e5d8c..b923eee1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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