Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Jekyll template for creating books in multiple formats: print PDFs, screen PDFs, websites, epubs, MS Word, and app files.
The Electric Book template is a Jekyll-based static-site project that converts Markdown source into print PDFs, screen PDFs, a website, epubs, MS Word documents, and Cordova-ready app files for Android, Windows, and iOS.
The Electric Book template is an open-source Jekyll project by Electric Book Works that takes Markdown book manuscripts and generates six output types: print-ready PDFs for high-end publishing, screen PDFs, a multi-book website, epubs, MS Word exports, and Cordova-ready files for building mobile apps. It runs on the command line through npm scripts and requires Jekyll, Ruby, Bundler, Node.js, Gulp, and GraphicsMagick for local use. The template includes a full documentation site in its _docs folder, and the sample book and samples folders demonstrate a complete default book with a French translation of samples.
npm run eb -- output with --format web (or -f web) for the website; -f print-pdf and -f screen-pdf for PDFs.--book / -b and a language with --language / -l (the template ships a French version of samples).--incremental rebuilds only changed files; --skipwebpack skips a webpack build when JavaScript is already compiled.--mathjax true enables MathJax for screen PDFs, or the output script detects it from Jekyll configs.npm run eb -- export produces MS Word files, using Pandoc and optionally rsvg-convert for better SVG handling.npm run eb -- output --baseurl="" --dontserve=true.npm run eb -- check verifies that all books listed in _data/works have the required folders and files.export command.--language fr for any book that has translations.npm run eb -- output -f print-pdf to get a print-ready PDF, or -f screen-pdf for a version meant to be read on screen.output command serves your books as a Jekyll website, with the ability to limit the build to one book using -b samples.npm run eb -- export --book samples --format screen-pdf to create a Word version of a book for traditional editing workflows.The template uses Jekyll to process Markdown content from book/ and other book folders, then npm scripts run webpack for JavaScript and PrinceXML for PDF generation. After running npm run setup once, you enter commands like npm run eb -- output to build the web version or add --format options for other formats. A check command validates project structure, and options like --incremental or --mathjax true adjust the build.
Yes, for local use you need Jekyll with Ruby and Bundler, plus Node.js, Gulp, and GraphicsMagick. PDF output also requires PrinceXML, and Word export requires Pandoc. The easiest path is to use GitHub Codespaces, which sets up dependencies automatically when you create a codespace from the repo.
The template itself is open source and free to use. The only proprietary dependency is PrinceXML, which is optional but required for PDF output. Electric Book Works offers paid consulting and support for organizations that want help using the template.
Not by default. The template now requires an npm run eb -- output build step, so standard GitHub Pages publishing no longer works without extra configuration. You can still publish via a custom GitHub Actions workflow, or use Netlify with the build command npm run eb -- output --baseurl="" --dontserve=true.
Yes. The template includes a shorter French version of the samples book. For any book that has translations, use the --language option (short form -l) to output a specific language, for example npm run eb -- output -f screen-pdf -b samples -l fr.
