Skip to content

kennethormandy/hb-epub3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hb-epub3

A Harp boilerplate for generating EPUB3 ebooks.

An example made using this boilerplate.

Get started

  1. Install Harp

This boilerplate is for Harp, the static web server with built-in preprocessing. Harp can flatten the preprocessed code—in this case, Jade, Stylus and Markdown—to HTML & CSS. Then, it can easily be turned into a .epub file.

Install Harp globally:

sudo npm install harp -g
  1. Clone this boilerplate

Next, clone this boilerplate.

git clone https://github.com/kennethormandy/hb-epub3 ebook
cd ebook
  1. Compile your .epub using Harp

Then, using the OS’ zip command, the generated folder can be compressed into a valid .epub file.

harp compile . ebook; cd ebook; zip -X0 \../ebook.epub mimetype; zip -rDX9 \../ebook.epub * -x "*.DS_Store" -x mimetype; cd \../

Now, if you want to make some quick changes and just view them in the browser, you can serve a locally:

harp server
# The content is now visible at http://harp.nu:9000/OPS/book/content

Todo

  • Properly support everything listed in harp.json
  • Further improve typographic defaults
  • Automatically use any Markdown in _content/
  • Restore text sizing in iBooks
  • Run against accessibility checklist

Works Cited

About

A Harp boilerplate for creating EPUB3 ebooks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published