You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add include_code remark plugin for auto-synced ONBOARDING.md snippets
ONBOARDING.md code snippets were manually copied from source files with
hardcoded line numbers that went stale on every contract change. This adds
the include_code remark plugin to extract snippets from source at build time.
- Add docs:start/docs:end markers to 7 source files (19 marker pairs)
- Create docs/ONBOARDING.src.md with #include_code directives
- Install include_code, remark, remark-cli; add .remarkrc.mjs config
- Add yarn docs:build script to regenerate ONBOARDING.md
- Update CLAUDE.md with new docs workflow instructions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,10 +148,27 @@ When updating the Aztec version, update all of these locations:
148
148
149
149
## ONBOARDING.md Maintenance
150
150
151
-
This repo includes an `ONBOARDING.md`that serves as a progressive tutorial for Ethereum developers learning Aztec. **When making code changes, check if `ONBOARDING.md`references the changed code** (line numbers, function signatures, code snippets, struct definitions) and update it accordingly. Key sections that embed code:
151
+
`ONBOARDING.md`is **generated** — do not edit it directly. Edit `docs/ONBOARDING.src.md`instead, then rebuild:
The source file uses `#include_code` directives (via the `include_code` remark plugin) to extract code snippets from source files at build time. Source files have `// docs:start:<name>` / `// docs:end:<name>` marker pairs that define snippet boundaries.
158
+
159
+
**When making code changes:**
160
+
161
+
1. Source code snippets update automatically on rebuild — no manual copy needed
162
+
2. If you add/remove/rename a marker, update the corresponding `#include_code` directive in `docs/ONBOARDING.src.md`
163
+
3. Run `yarn docs:build` to regenerate `ONBOARDING.md`
164
+
4. Phase 5 exercises and non-source prose still need manual updates in `docs/ONBOARDING.src.md`
0 commit comments