mkdocs2book — Convert MkDocs Documentation to Books

January 01, 2020

mkdocs2book converts documentation written in MkDocs format into readable books in multiple formats (PDF, EPUB, HTML). It uses a modified version of mkdocscombine to merge all .md files into a single Pandoc source, then applies custom LaTeX templates to produce well-formatted output.

How It Works

  1. Uses a modified mkdocscombine to combine all *.md files into a single Pandoc file (book.pd), following the order defined in mkdocs.yml
  2. Applies a modified LaTeX template from pandoc-book-template with proper code block wrapping
  3. Uses Pandoc to generate .PDF and .EPUB output

Usage

sudo docker build -f Dockerfile -t mkdocs2book:latest .

git clone https://github.com/ebadi/carla.git
sudo docker run -v=$PWD:/data/ mkdocs2book:latest /data/build.sh carla

git clone https://github.com/ebadi/scenario_runner.git
sudo docker run -v=$PWD:/data/ mkdocs2book:latest /data/build.sh scenario_runner

Example outputs: Carla Simulator PDF and Scenario Runner PDF.

mkdocs2book GitHub repository