Code Samples That Compile Even More Easily
summary
A concrete workflow for keeping Markdown examples compiled and up to date using mdsnippets: embed snippet-marked tests directly in source, drop the paired .source.md files, run the tool to regenerate docs with syntax highlighting and live anchors, and push changes (demo uses a Catch2 fork push). Options shown to enforce it are a pre-commit hook or a GitHub Action. Demo also shows integrating with ApprovalTests.cpp and using IDE live templates to create snippets.
AI-written summary · about
related talks
24mEscaping the Curse of Outdated Docs
28mCode the Docs: Interactive Document Environments
47mDocumentation as code (explained to my dad)
49mExplain Yourself! Documentation for Better Code
36mBuilding Docs like Code: Continuous Integration for Documentation
34mCode the Docs: Interactive Document Environments
35mThe practical implementation of Documentation as Code
37mCode the documentation instead of documenting the code
