An illustration of an enormous book. It is open, and its pages are each filled with an image of a starry sky. Beside the book, a man stands and looks at the pages. The book is bigger than he is.

Book-making with superpowers

The Electric Book template is a code framework for producing web books, ebooks, and print books from a single content source. It is packed with features for professional book production, and lets team members collaborate on projects remotely. You’re looking at the default website it generates.

The template includes a blank book to add your content to.

Learn from a book of examples, with a partial translation.

The template’s documentation explains how its features work.

You’ll find the open-source repository on GitHub.

Sample content

To see how these examples look in other formats, download PDF and epub versions of the sample book.

  • The contents page listing all the sample content included with the Electric Book template.
  • As an example of plain text, the first section of ‘A Scandal in Bohemia’, a Sherlock Holmes story by Sir Arthur Conan Doyle.
  • Examples of a multiple-choice question and a fill-in-the-blank question, to show how they appear on screens and paper.
  • A chapter from The Count of Monte Christo interspersed with simple images.
  • A research paper that includes figures with reference numbers, captions and sources.
  • Examples of maths, defined in TeX syntax, and then properly formatted on the page by MathJax.
  • This page shows how video from YouTube and Vimeo can be added to a book.
  • Ideally, the page numbers in a book index should be clickable links. Here is a small example.

Features

Web, mobile, and print

You can instantly output print PDF, screen PDF, epub, website and app versions of your books from a single content source.

Series and collections

Create a series or collection of books in one website or app. They can share common designs, features and metadata.

Fast and mobile-friendly sites

The template generates a static website, which is secure, easy to host, and lightning fast. It’s also designed to be mobile-friendly throughout.

Windows, Mac, Linux

You can use the template on Windows, Mac and Linux computers. We recommend working in your browser with Gitpod, in which case you don’t need to install anything on your computer.

Documentation

The docs you need are embedded in your project, including guidance on how to edit in markdown.

Online editing

Team members can contribute online by either editing files on GitHub directly, or by using Gitpod. Our built-in Gitpod support means you can instantly start editing and generating a website, ebooks and PDFs. Launch a testing environment here right now.

Export to Word

Sometimes you need your book in MS Word format. For instance, an author might be working on a new edition. You can easily, instantly export books to MS Word.

Design and layout

Built-in book features

Select from dozens of built-in tags for common book features, such as boxes, epigraphs, sidenotes and bibliographies.

Easy design settings

We deliberately made this template look plain – it’s ready for your design flair. Quickly change the design with dozens of simple settings, from fonts and sizes to the position of page numbers and the width of your sidebar. Then add your own CSS stylesheets. See the Electric Book Works portfolio for examples of what’s possible.

Mathematics

Include complex maths using LaTex notation.

Refined page typography

For high-quality print publishing, control letter-spacing in individual paragraphs for page refinement. There are many other page-refinement tags available for advanced users.

Optimised images

Automatically convert your master images to optimized sizes and color profiles. For instance, CMYK for print, and RGB at different sizes for large vs mobile screens.

Books indexes with automatic page numbers

Create back-of-the-book indexes where page numbering is automated, and the index works in website and ebook editions, too. Read more at Electric Book Works.

Easily control colour and PDF profiles for professional, large-scale printing.

Translations and variants

Translations

Add translations of a book to a project, and localise (i.e. provide translations for) landing pages and button text.

Variant editions

Instantly generate variant editions of a book with different content or designs. For instance, a teacher’s edition of a setwork with extra teaching notes, all from the same content source.

Redacted PDFs

Tag text and images for redaction, then instantly output fully redacted PDFs without affecting page flow.

Interactivity

Bookmarking

Users can save their places, and the site will also automatically save their last location for the next time they visit.

Easily build and refresh search indexes for website and app outputs.

Interactive questions

Add self-marking multiple-choice questions, and group them into quizzes. Add fill-in-the-blank questions to any text.

Video

Easily embed streaming video from YouTube or Vimeo.

Collapsible pages

Make long web pages collapse on major headings for easier reading. See a demo here.

Clickable slides

Let users click through slideshows, with useful equivalents in offline epub and PDF versions.

Extending and integrating

WordPress compatible

Do you already have a WordPress website? Electric Book websites live happily side-by-side with WordPress. Just place the generated files in a subfolder on your WordPress server.

Annotation

Turn on open annotation on website editions with Hypothesis. Useful for both public comment and private team discussions. See annotation in action on this demo.

Open-source software

The template is open-source software, so you never have to worry about being locked out of your own books, or finding yourself at the mercy of one vendor’s pricing. You can change anything about the Electric Book software yourself, as needed.

Note that the template does use the excellent PrinceXML for PDF output. Prince is not open-source, and is available as a free trial. We are working on providing open-source alternatives.

Technical advantages

Free hosting

You can host an Electric Book site for free with services like GitHub Pages and Netlify. The template works out of the box with both.

Best-practice version control

The template is designed to work with Git version control software. We recommend storing and collaborating on your project on GitHub, GitLab or BitBucket.

Separate image storage

For books with many large images, link to remote media and build Google Play apps with expansion files.

Continuous deployment

We provide setup guidance for setting up free continuous deployment with CodeShip Basic.

Packaging projects

Need to share, copy, or archive a project easily? Instantly create a zip package of your project with one command.

If you’re maintaining related Electric Book projects, keep them in sync with instant updates.