Pandoc is the tool that Iā€™m using to convert šŸ”» Markdown files to HTML. By default, Pandoc outputs only the information in the Markdown file. This would require manually updating each resulting HTML file to include the Bootstrap CSS and HTML changes from the previous section. Luckily, Pandoc has the concept of Templates. This blog post further explains how to convert Markdown to HTML and use Pandoc templates in the process.

An example template could look something like this:

<!DOCTYPE html>
<html data-bs-theme="dark">
    <head>
        <link href=<bootstrap-url> rel="stylesheet" (...)>
    </head>
    <body>
        <div class="container">
            $body$
        </div>
    </body>
</html>

This template is applied by running

pandoc --standalone --template template.html <markdown-file> -o <output-file>