EPUB Reader on your website.
You can publish EPUB books on the web, with a permalink for each book. And you can embed it in other webpages, just like YouTube videos.
- EPUB 3+ and 2 compliant. Supports both fixed-layout and reflow books of various language.
- Made with JavaScript. Works compatibly with all major web browsers on various OS/devices.
- Open source software released under the MIT License.
- How to Setup & Read/Publish EPUB Books (for Users/Publishers)
- How to Arrange Development Environment (for Developers)
- License
- Special Thanks
BiB/i supports 3 ways to read/publish EPUB books:
- Read in browsers on your local machine.
- Publish on the web to have your books read by someone.
- Open to the public as an online EPUB viewer for visitors' local EPUBs.
In all cases,
- Download BiB/i from GitHub release page or BiB/i website.
- And unzip it at first.
- Open
bib/i/index.html
in your browser, and - Drag an EPUB book and drop it into the window.
- That's all!
Demo.
You can publish both unzipped folder and zipped EPUB archive.
Using unzipped folder is recommended for the book which is heavy or contains many files. Using zipped EPUB file is recommended for the book which is light or contains less files.
- Upload
bib
folder on your web server. - Unzip an EPUB book,
- Change the file extension from
.epub
to.zip
(BOOKNAME.epub
->BOOKNAME.zip
), and - Unzip the file with some tool.
- Change the file extension from
- Upload the unzipped folder
BOOKNAME
intobib/bookshelf
directory, and - Access to
https://your.web.site/somewhere/bib/i/?book=BOOKNAME
by your browser. (note that it has no extension) - Or embed code below into your blog entry or other webpages, and visit the entry.
<a href="https://your.web.site/somewhere/bib/i/?book=BOOKNAME" data-bibi="embed" data-bibi-style="[[ CSS for embeded BiB/i frame, as you like ]]">My Great Book Title</a><script src="https://your.web.site/bib/i.js"></script>
- Upload
bib
folder on your web server. - Upload your EPUB book (ex.
BOOKNAME.epub
) tobib/bookshelf
directory, and - Access to
https://your.web.site/somewhere/bib/i/?book=BOOKNAME.epub
by your browser. - Or embed code for it.
<a href="https://your.web.site/somewhere/bib/i/?book=BOOKNAME.epub" data-bibi="embed" data-bibi-style="[[ CSS for embeded BiB/i frame, as you like ]]">My Great Book Title</a><script src="https://your.web.site/bib/i.js"></script>
- Upload
bib
folder on your web server. - Navigate visitors to
https://your.web.site/somewhere/bib/i
. - Visitors can read one's local EPUBs by draging and dropping EPUBs into the window.
If you want to terminate this feature, set "no" to "accept-files" in bib/i/presets/default.js
.
- Clone this repository.
- $
cd <the local repository>
- $
npm install
- $
npm start
- webpack generates development version of files and start to watch changes of the files.
- BrowserSync webserver launches and navigate your browser to
http://localhost:61671/bib/i/?book=
.
- Edit source files.
- webpack watches your modification and updates development version of the file(s) with sourcemaps.
- BrowserSync reloads your browser(s) or inject changes of CSS.
-
SCSS source file(s) of...
bib/i/res/styles/bibi.css
are indev-bib/i/res/styles/
,- Styles in
bib/i.js
isdev-bib/i.scss
.
-
JavaScript source file(s) of...
bib/i/res/scripts/bibi.js
are indev-bib/i/res/scripts/
,bib/i.js
isdev-bib/i.js
,- the extensions in
bib/i/extensions/
are indev-bib/i/extensions/
.
-
These files are not processed by webpack:
- Root HTML file of BiB/i:
bib/i/index.html
- Preset file in
bib/i/presets/
- Files in
bib/bookshelf/
(this directory contains.gitkeep
)
- Root HTML file of BiB/i:
- $
npm run build
- webpack generates production version of files.
- $
npm run make:distribution
- webpack generates production version of files.
- gulp generates zipped archive.
- Copyright © Satoru MATSUSHIMA (@satorumurmur)
- Licensed under the MIT License.
- Core components:
- sML.js ... Copyright © Satoru MATSUSHIMA (Licensed under the MIT License.)
- Material Icons ... Copyright © Material Design Authors / Google Inc. (Licensed under the Apache License version 2.0.)
- Font Awesome Free ... Copyright © Dave Gandy (Licensed under the SIL Open Font License (OFL) 1.1.)
- Extensions:
- JSZip ... Copyright © Stuart Knightley (Dual licensed under the MIT License or the GPLv3.)
- JSZipUtils ... Copyright © Stuart Knightley (Dual licensed under the the MIT License or the GPLv3.)
- JS-YAML ... Copyright © Vitaly Puzrin (Licensed under the MIT License.)
- Polyfills (for Internet Explorer):
- classlist-polyfill ... by Yola Inc. (Released into the public domain under the Unlicense)
- text-encoding-utf-8 ... by Erik Arvidsson (Released into the public domain under the Unlicense.)
- IntersectionObserver polyfill ... Copyright (c) W3C (Licensed under the W3C Software and Document License.)
- document.currentScript Polyfill ... Copyright © Adam Miller (Licensed under the MIT License.)
- custom-event-polyfill ... Copyright © Evan Krambuhl (Licensed under the MIT License.)
- Native Promise Only (NPO) ... Copyright © Kyle Simpson (Licensed under the MIT License.)
- Polyfill Array.prototype.includes ... Copyright © Kevin Latusinski (Licensed under the MIT License.)
- String.prototype.padStart ... Copyright © Khaled Al-Ansari (Licensed under the MIT License.)
- url-polyfill ... Copyright © Valentin Richard (Licensed under the MIT License.)