A professional book-as-code starter kit. Generate publisher-ready PDF books from Markdown using a fully automated pipeline.
View Sample PDF | Documentation | GitHub
- Markdown Power: Write your book in simple Markdown.
- Dynamic Metadata Pages: Add optional dedications, introductions, and prefaces using
.mdor.texfiles. - Pro Layout: Uses the Eisvogel LaTeX template for stunning "O'Reilly-style" PDFs.
- Automated Build: One command to merge chapters, fix image paths, and compile the PDF.
- Diagrams & Math: Native support for Mermaid diagrams and KaTeX math formulas.
- Environment Agnostic: Fully configured Docker and VS Code DevContainer setup.
- CI/CD Ready: Automatically builds and releases your book PDF via GitHub Actions.
- Click the "Use this template" button above.
- Open the repository in VS Code.
- Reopen in Dev Container when prompted.
- Run the build:
pnpm run build
- Find your book in the
output/directory (named after your title).
If you prefer to run the build script directly on your machine, you'll need the following tools:
Pandoc is the engine that converts Markdown to LaTeX.
- macOS:
brew install pandoc - Linux:
sudo apt-get install pandoc - Windows:
winget install pandoc
You need a LaTeX distribution to generate the PDF. This template requires the koma-script bundle.
- macOS (MacTeX):
brew install --cask mactex-no-gui - Linux:
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra
Required for rendering Mermaid diagrams.
- Install Node.js
- Install pnpm:
npm install -g pnpm - Run
pnpm installin the project root.
Check out the Getting Started Guide for a detailed breakdown.
To customize your book further, check out these official documentations:
- Pandoc Manual: LaTeX Variables - Every variable you can use in your
metadata.yml. - Eisvogel Template Docs - Detailed styling options for the layout used in this template.
- Mermaid Diagrams - Syntax for creating charts and diagrams.
- KaTeX Math - Support for mathematical formulas.
Built with ❤️ by WriteOps.
