Difference between revisions of "Epub.js"
From TSAS Library
JStallings (talk | contribs) |
JStallings (talk | contribs) |
||
| Line 20: | Line 20: | ||
==Annotations== | ==Annotations== | ||
===Hypothes.is=== | |||
To run hypothes.is annotations that are bundled with epub.js, add <code><script src="annotator.min.js"></script></code> to trial.html. | To run hypothes.is annotations that are bundled with epub.js, add <code><script src="annotator.min.js"></script></code> to trial.html. | ||
===Annotator=== | |||
# Download recent full release .zip | |||
# Unzip to /epub.js/annotator | |||
# Copy <code><script src="../annotator/annotator.min.js"></script> to trial.html file above, just before <code></body></code> | |||
==See Also== | ==See Also== | ||
Revision as of 12:05, 13 November 2016
Local Installation
- Install Git
- Install Node.js
- Clone latest branch from here with
git clone [url] - (For 0.3) Install the project dependencies with npm
npm install[1] - Install bower
bower install - Run server with
./tools/server - Navigate to http://localhost:8080/tests and lament the errors.
- Navigate to http://localhost:8080 and celebrate the successful test.
Viewing Your ebooks
- Copy source code from an example html file at epub.js\examples. Contained.html is recommended if using standard (zipped) epub files. Save as trial.html in epub.js\examples
- Place .epub file in /books
- Open .html in editor, copy epub path to
var Book = ePub("../reader/moby-dick.epub");. Something likevar Book = ePub("../books/[your epub filename"); - Make sure server is running (see step 6, above)
- Open browser to http://localhost:8080/examples/trial.html
- Rejoice.
Annotations
Hypothes.is
To run hypothes.is annotations that are bundled with epub.js, add <script src="annotator.min.js"></script> to trial.html.
Annotator
- Download recent full release .zip
- Unzip to /epub.js/annotator
- Copy
<script src="../annotator/annotator.min.js"></script> to trial.html file above, just before</body>
See Also
References