https://github.com/kennethormandy/hb-epub3
A Harp boilerplate for creating EPUB3 ebooks.
https://github.com/kennethormandy/hb-epub3
Last synced: 4 months ago
JSON representation
A Harp boilerplate for creating EPUB3 ebooks.
- Host: GitHub
- URL: https://github.com/kennethormandy/hb-epub3
- Owner: kennethormandy
- Created: 2013-10-01T05:24:30.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-01T16:28:57.000Z (almost 13 years ago)
- Last Synced: 2025-01-24T09:41:34.415Z (over 1 year ago)
- Size: 794 KB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# hb-epub3
A Harp boilerplate for generating EPUB3 ebooks.

## Get started
1. Install Harp
This boilerplate is for Harp, the static web server with built-in preprocessing. [Harp](http://harpjs.com) 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:
```ssh
sudo npm install harp -g
```
2. Clone this boilerplate
Next, clone this boilerplate.
```ssh
git clone https://github.com/kennethormandy/hb-epub3 ebook
cd ebook
```
3. Compile your `.epub` using Harp
Then, using the OS’ `zip` command, the generated folder can be compressed into a valid `.epub` file.
```ssh
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:
```ssh
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
* [Candide by Voltaire, via Project Gutenberg](http://www.gutenberg.org/ebooks/19942)
* [reitermarkus/epub3-boilerplate](https://github.com/reitermarkus/epub3-boilerplate)
* [javierarce/epub-boilerplate](https://github.com/javierarce/epub-boilerplate)
* [Saolee/epub-boilerplate](https://github.com/Saolee/epub-boilerplate)
* [mattharrison/epub-css-starter-kit](https://github.com/mattharrison/epub-css-starter-kit)