Make sure you've installed mdBook. You'll also need CMake for most edits.
The custom theme/highlight.js
is needed because the default mdBook highlight.js
doesn't include the some languages. To regenerate a custom build of theme/highlight.js
use ./scripts/generate-highlightjs.sh
.
To create a new example:
- Add it to
SUMMARY.md
.
Ex:- [Cool feature](14-cool-feature.md)
- Create a markdown file in
src/
with a numeric prefix.
Ex:src/14-cool-feature.md
- Create a directory in
listings/
.
Ex:listings/14-cool-feature/
- Create a new
devcontainer.json
in.devcontainer/<id>/
.
Ex:.devcontainer/14-cool-feature/devcontainer.json
- Add content to the example.
- Add any software requirements to the
devcontainer.json
file.
Ex:"updateContentCommand": "sudo apt-get install libzstd-dev"
- Manually generate an
output.txt
file in thelistings/<id>/
directory.
Ex:listings/14-cool-feature/output.txt