This repository contains the source of "The Mun Programming Language" book. It is hosted on netlify.
Building the book requires mdBook, ideally version 0.3.x. To install it, run:
$ cargo install mdbook --vers [version-num]
The Mun book uses a custom version of Highlight.js to enable highlighting of Mun code. The build version of Highlight.js is required by mdbook in the theme/ folder but it is not distributed with the source. Instead, it can be build by invoking the build script:
./ci/build-highlight-js
Every time you change something in the custom version of highlight.js you have to call the above script to ensure you locally use the latest version.
After generating the custom minified Highlight.js, to build the book, type:
$ mdbook build
The output will be in the book subdirectory. To view the book, open it in your web browser.
For local development use mdbook serve
instead of mdbook build
. This will
start a local webserver on port 3000
that serves the book and rebuilds the
content when changes are detected.
All of the above is also combined in a single shell script that can be invoked by simply running:
./ci/build
The Netlify deployment works by simply invoking this script.