Skip to content

WriteOps/book-template

Repository files navigation

WriteOps

A professional book-as-code starter kit. Generate publisher-ready PDF books from Markdown using a fully automated pipeline.

View Sample PDF | Documentation | GitHub

Build PDF

✨ Features

  • Markdown Power: Write your book in simple Markdown.
  • Dynamic Metadata Pages: Add optional dedications, introductions, and prefaces using .md or .tex files.
  • 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.

🚀 Getting Started

  1. Click the "Use this template" button above.
  2. Open the repository in VS Code.
  3. Reopen in Dev Container when prompted.
  4. Run the build:
    pnpm run build
  5. Find your book in the output/ directory (named after your title).

🛠️ Local Installation (Without Docker)

If you prefer to run the build script directly on your machine, you'll need the following tools:

1. Pandoc (3.0+)

Pandoc is the engine that converts Markdown to LaTeX.

  • macOS: brew install pandoc
  • Linux: sudo apt-get install pandoc
  • Windows: winget install pandoc

2. TeX Live

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

3. Node.js & pnpm

Required for rendering Mermaid diagrams.

  • Install Node.js
  • Install pnpm: npm install -g pnpm
  • Run pnpm install in the project root.

📂 Project Structure

Check out the Getting Started Guide for a detailed breakdown.

📚 References & Resources

To customize your book further, check out these official documentations:


Built with ❤️ by WriteOps.

About

A professional book-as-code starter kit using Markdown, Pandoc, and Eisvogel LaTeX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors