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.
What is the Electric Book template?
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.
Key features
- Six output formats — print PDF, screen PDF, web, epub, MS Word, and Cordova-ready app files from a single Markdown source.
- npm command-line workflow — use
npm run eb -- outputwith--format web(or-f web) for the website;-f print-pdfand-f screen-pdffor PDFs. - Per-book and per-language builds — select a book with
--book/-band a language with--language/-l(the template ships a French version ofsamples). - Fast iteration options —
--incrementalrebuilds only changed files;--skipwebpackskips a webpack build when JavaScript is already compiled. - Maths rendering —
--mathjax trueenables MathJax for screen PDFs, or the output script detects it from Jekyll configs. - Word export command —
npm run eb -- exportproduces MS Word files, using Pandoc and optionally rsvg-convert for better SVG handling. - Deployment workflows — the repo includes GitHub Actions for deploying to Electric Book Server with S3 and to a web server via FTP/SSH; Netlify deployment works with
npm run eb -- output --baseurl="" --dontserve=true. - Project health check —
npm run eb -- checkverifies that all books listed in_data/workshave the required folders and files.
Who is it for?
- Publishers and self-publishing authors who need print-ready PDFs, epubs, and a companion website without assembling separate toolchains.
- Editorial teams that rely on MS Word for tracked changes can receive Word exports generated by the
exportcommand. - Organizations with multilingual catalogs can output French (or other) versions by passing
--language frfor any book that has translations. - Developers comfortable with the command line — those who know Git and static-site generators will find the Jekyll and Node setup familiar; GitHub Codespaces lets you skip local installation entirely.
What can you do with the Electric Book template?
- Produce print and screen PDFs: run
npm run eb -- output -f print-pdfto get a print-ready PDF, or-f screen-pdffor a version meant to be read on screen. - Build a multi-book website: the default
outputcommand serves your books as a Jekyll website, with the ability to limit the build to one book using-b samples. - Generate mobile app source: the template outputs Cordova-ready files, so you can build Android, Windows, and iOS apps with Cordova, Android Studio, and Xcode.
- Export to MS Word for editing: use
npm run eb -- export --book samples --format screen-pdfto create a Word version of a book for traditional editing workflows.
How does the Electric Book template work?
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.
FAQ
Does the Electric Book template require Jekyll to be installed?
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.
Is the Electric Book template free?
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.
Can I deploy the Electric Book template to GitHub Pages?
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.
Does the template support languages other than English?
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.








