Code Monkey home page Code Monkey logo

epub-zero's Introduction

#EPUB Zero

EPUB Zero is a portable web publication format created from existing Web specifications. Think of it as a vernacular. Think of it as progressive enhancement for books. Think of it as books in browsers.

In a nutshell, EPUB Zero is:

  • a folder
  • of well structured, semantic, accessible OWP content (HTML5, CSS, SVG, MathML, images, audio, video)
  • with a navigation file called index.html in the top level of the folder
MobyDick/
  index.html
  html/
    c001.html
    c002.html
    c003.html
  css/
    mobydick.css
  images/
    moby-dick-book-cover.jpg
  • which includes a nav element listing all the content documents in a default sequence, with links and link text.
<nav id="nav1">
  <ol>
    <li><a href="html/c001.html">Loomings</a></li>
    <li><a href="html/c002.html">The Carpet-Bag</a></li>
    <li><a href="html/c003.html">The Spouter-Inn</a></li>
  </ol>
</nav>

Drop this in a web server, and anyone who has the URI of the folder can read everything in the book. Of course, we want more from our books, and so we can progressively enhance an EPUB Zero:

  • use HTML link relations to describe the relationships between documents, possibly using a bit of JavaScript to allow keyboard navigation through the document sequence for browsers that don't support functionality (kudos to Firefox and Opera, shame on Safari, Chrome, and Edge).
<head>
  <title>Moby-Dick</title>
  <meta charset="utf-8">
  <link rel="contents" href="../index.html">
  <link rel="prev" href="c001.html" />
  <link rel="next" href="c003.html" />
</head>
  • include a manifest to facilitate offline reading, caching, or other useful behaviors. In the future we hope to align with the web application manifest spec.
{
  "title": "Moby-Dick",
  "edition": 1,
  "assets": [
    "",
    "index.html",
    "css/mobydick.css",
    "images/moby-dick-book-cover.jpg",
    "html/c001.html",
    "html/c002.html",
    "html/c003.html"
  ]
}
  • include metadata inside or outside content files. By convention, metadata expressed in index.html is assumed to apply to the entire publication. Metadata expressed in other content files applies only to those files.

  • include EPUB 3.X components like package and container files, so an EPUB Zero can also function as an EPUB 3.X document. This may require some compromises, like using the XML serialization of HTML5 and having to ZIP in strange ways.

  • ZIP or otherwise package the EPUB Zero to facilitate portability.

##Examples

See https://dauwhe.github.io/epub-zero/acme-publishing for a small website for viewing books in browsers.

##Further Reading

epub-zero's People

Contributors

caraya avatar dauwhe avatar pkra avatar tzviyasiegman avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.