Skip to content

LeafPress

Convert MkDocs sites to branded PDF and Word documents — from the CLI, desktop, or CI.

Home

PyPI License: MIT CI

PDF & Word Output

Generate polished PDF and DOCX files from any MkDocs project with a single command.

Custom Branding

Cover pages, logos, colors, and footers — all configurable via leafpress.yml.

Git-Aware

Automatically embeds tag, branch, commit hash, and date into your documents.

CLI & Desktop UI

Use the command line for automation or the desktop app for a visual workflow.

CI / GitHub Actions

Run in pipelines with environment variables and the built-in GitHub Action.

Remote Sources

Convert directly from git URLs — no need to clone repos manually.

Quick Start

$ pip install leafpress
---> 100%
Successfully installed leafpress

$ leafpress init
Created leafpress.yml

$ leafpress convert . -f pdf -o dist/
Converting MkDocs site to PDF...
✓ dist/docs.pdf

$ leafpress convert . -f both -c leafpress.yml -o dist/
Converting MkDocs site to PDF and DOCX...
✓ dist/docs.pdf
✓ dist/docs.docx

Next Steps