<p><em>mkbook</em> generates a completely static, javascript-free website from a series of Markdown files. All of the layout and styling is controlled purely by hand-crafted CSS specific to this book’s purpose.</p>
<p><em>mkbook</em> currently bundles two assets which get written into the book directory: <code>favicon.ico</code>, and <code>icons.svg</code>. <code>favicon.ico</code> is the <ahref="https://fontawesome.com/icons/book?style=solid">Font Awesome 5 book icon</a>, and <code>icons.svg</code> contains 3 <ahref="https://fontawesome.com/">Font Awesome 5</a> arrow icons: <ahref="https://fontawesome.com/icons/arrow-left?style=solid">arrow-left</a>, <ahref="https://fontawesome.com/icons/arrow-right?style=solid">arrow-right</a>, and <ahref="https://fontawesome.com/icons/arrow-up?style=solid">arrow-up</a> which are used for navigation. These files are compiled into the <em>mkbook</em> binary using the <ahref="https://doc.rust-lang.org/std/macro.include_bytes.html"><code>include_bytes!</code> macro</a>, and written to the output folder on each build.</p>
<p><em>mkbook</em> utilizes <ahref="https://sass-lang.com/">Sass</a> to define it’s styles; you can view the sources <ahref="https://github.com/hamaluik/mkbook/tree/master/style">on github</a>. In <em>mkbook</em>’s build script, the styles are compiled from their native <code>.scss</code> format into a single, compressed <code>.css</code> file using <ahref="https://crates.io/crates/sass-rs">sass-rs</a>. The resulting <code>.css</code> file is then bundled into the binary using the <ahref="https://doc.rust-lang.org/std/macro.include_str.html"><code>include_str!</code> macro</a>. When a book is generated, this <code>.css</code> is written to the output folder as <code>style.css</code>, where it is included by each generated <code>.html</code> file.</p>
<p><em>mkbook</em> contains two template files: one for the index, and one for each page / chapter, and uses <ahref="https://crates.io/crates/askama">Askama</a> to render the templates. Since the <em>Askama</em> templates are compiled when <em>mkbook</em> is compiled, it is not currently possible to change the templates at run time. You can view the sources for these templates <ahref="https://github.com/hamaluik/mkbook/tree/master/templates">on github</a>.</p>
<p>Markdown is formatted usiing <ahref="https://crates.io/crates/comrak">comrak</a> with some specific options, see the <ahref="02-markdown.html">Markdown chapter</a> for more information.</p>
<p>Code is syntax-highlighted using <ahref="https://crates.io/crates/syntect">syntect</a> with the default langauges and the <code>base16-eighties</code> colour scheme. Some additional languages above the base list supported by <em>syntect</em> have been aded:</p>