@archival-iiif/presentation-builder
v1.5.3
Published
Javascript library for generating IIIF manifests.
Downloads
28
Readme
Supported specifications
- Presentation API 3.0
- Presentation API 2.1
- Image API 3.0
- Image API 2.1
- Authentication API 1.0
- Search API 1.0
Installation
presentation-builder is available as an npm package.
// with npm
npm -i @archival-iiif/presentation-builder
// with yarn
yarn add @archival-iiif/presentation-builder
Usage
Code
import {Manifest} from "@archival-iiif/presentation-builder";
const m = new Manifest('https://example.org/iiif/book1/manifest', 'Book 1');
m.setContext();
JSON output
{
"id": "https://example.org/iiif/book1/manifest",
"type": "Manifest",
"@context": [
"http://www.w3.org/ns/anno.jsonld",
"http://iiif.io/api/presentation/3/context.json"
],
"label": {"none": ["Book 1"]}
}
More examples
- Manifest (Presentation API 3.0)
- Collection (Presentation API 3.0)
- Image Information (Image API 3.0)
- Manifest (Presentation API 2.1)
- Collection (Presentation API 2.1)
- Image Information (Image API 2.1)
License
This software is released under the MIT license.