To build the book, you will first need to install mdBook and mdbook-linkcheck:
cargo install mdbook mdbook-linkcheck
Note that for consistency we use specific versions of these tools on CI, so the one you install might be newer than the one used to build and deploy the book. To check the versions we currently assume, look at the workflows directory.
In order to highlight the Fathom code examples in the book we override mdBook's built-in highlight.js with our own. To build the highlighting code, run the following commands using Yarn:
yarn workspace book install
yarn workspace book build
You will need to rebuild the book or restart the mdBook server for changes to take effect.
You can then serve the documentation locally by calling the serve
command
from the book
directory:
mdbook serve
Alternatively it can be called from the root of the repository:
mdbook serve book