Skip to content

Instantly share code, notes, and snippets.

@HadrienGardeur
Created June 27, 2017 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HadrienGardeur/6be26cd3eff3fc8df562c7bc113cf25a to your computer and use it in GitHub Desktop.
Save HadrienGardeur/6be26cd3eff3fc8df562c7bc113cf25a to your computer and use it in GitHub Desktop.
{
"@context": "https://www.w3.org/TR/wpub/context.jsonld",
"name": "Moby Dick",
"author": "Herman Melville",
"identifier": "urn:isbn:978031600000X",
"lang": "en",
"dir": "ltr",
"start_url": "/chapter1",
"display": "fullscreen",
"spine": [
{"href": "/chapter1", "type": "text/html", "title": "Chapter 1"},
{"href": "/chapter2", "type": "text/html", "title": "Chapter 2"}
],
"resources": [
{"rel": "cover", "href": "cover.jpg", "type": "image/jpeg", "height": 600, "width": 400},
{"href": "style.css", "type": "text/css"}
]
}
@HadrienGardeur
Copy link
Author

HadrienGardeur commented Jun 27, 2017

First attempt at merging work from Readium Web Publication Manifest into the Web App Manifest syntax.

There are a number of issues even with this minimal approach:

  1. We can't provide multiple languages in name, something that has been deemed as important over and over again in Japan.
  2. Same issue with lang, that doesn't allow multiple languages (useful for bilingual publications).

Main differences with Web App Manifest:

  1. Added a context document that would be tied to schema.org.
  2. Added a number of metadata elements (author and identifier)
  3. Added spine and resources, as defined in Readium Web Publication Manifest (collection role + array of link objects)

Main difference with Readium Web Publication Manifest is the lack of a consistent abstract model. This means that without knowing each and every element, it's impossible to know what they are (metadata vs collection).
This means that Web App Manifest can't be used as a hypermedia format (for OPDS 2.0 among others), unlike the Readium Web Publication Manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment