Skip to content

Conversation

@basnijholt
Copy link
Owner

Summary

Adds documentation for future maintainers explaining the documentation build system and why it's designed the way it is.

The Recursion Problem

The docs use markdown-code-runner to generate content, but also contain examples of the tool's syntax. If those examples were executed, they'd become useless as examples - users need to see the template syntax, not executed results.

What This Documents

  • CODE:SKIP directive - Prevents example code blocks from being executed
  • PLACEHOLDER pattern - OUTPUT sections contain placeholder text that gets replaced during CI, but generated content is never committed
  • Nested HTML comment escaping - How to write code that references markers inside HTML comments without breaking parsing
  • Pre-commit hook - The hook that prevents accidental commits of generated content
  • Why we don't commit generated output - Copyability, recursion avoidance, single source of truth, cleaner diffs

Test plan

  • File is well-formatted markdown
  • Pre-commit hooks pass

Documents the recursion problem and how we solve it:
- CODE:SKIP to prevent example execution
- PLACEHOLDER pattern for templates
- Nested HTML comment escaping
- Why generated content is not committed
@basnijholt basnijholt merged commit 9cad8b7 into main Jan 14, 2026
14 checks passed
@basnijholt basnijholt deleted the docs/developer-notes branch January 14, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants