Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/generate-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
if [[ -n "$(git status --porcelain)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add projects/**/manifest.json projects/**/README.md projects/**/WARNING.md
git add README.md projects/**/manifest*.json projects/**/README.md projects/**/WARNING.md
git commit -m "chore: regenerate manifests"
git push
else
Expand Down
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Github Manifests

Generate and publish IIIF Presentation 3 manifests for TPEN3 and IIIF viewers such as Mirador.
Generate and publish IIIF Presentation 3 and 4 manifests for TPEN3 and IIIF viewers such as Mirador.

## Purpose

Expand All @@ -19,7 +19,9 @@ This repository is designed for low-friction manifest creation:
β”‚ β”œβ”€β”€ example-project/
β”‚ β”‚ β”œβ”€β”€ images/
β”‚ β”‚ β”œβ”€β”€ info.yml
β”‚ β”‚ β”œβ”€β”€ manifest.json # generated
β”‚ β”‚ β”œβ”€β”€ manifest.json # generated (primary version)
β”‚ β”‚ β”œβ”€β”€ manifest-v3.json # generated (Presentation 3)
β”‚ β”‚ β”œβ”€β”€ manifest-v4.json # generated (Presentation 4)
β”‚ β”‚ β”œβ”€β”€ README.md # generated
β”‚ β”‚ └── WARNING.md # generated
β”œβ”€β”€ scripts/
Expand All @@ -45,7 +47,7 @@ Required:

Optional:

- info.yml for metadata, ordering, and top-level IIIF fields
- info.yml for metadata, ordering, top-level IIIF fields, and presentationVersion

Supported external resource methods:

Expand All @@ -59,6 +61,29 @@ Ordering priority is:
1. resources entries in info.yml (by order, then natural file/url sort)
2. remaining local images and .lnk files in natural filename order

## IIIF Presentation Versions

Each generation run writes three manifests per project:

- manifest.json: the primary manifest, using the project's configured version
- manifest-v3.json: always IIIF Presentation 3
- manifest-v4.json: always IIIF Presentation 4

The primary version defaults to 3 so existing tools keep working.
To switch a project's primary manifest to Presentation 4, set this in info.yml:

```yaml
presentationVersion: 4
```

The version-pinned manifests are always published, so tools that are not yet upgraded can keep using manifest-v3.json while v4-ready tools use manifest-v4.json.
Canvas, page, and annotation ids are identical across all three serializations, so annotations remain valid whichever version a tool loads.

Reference guidance:

- [IIIF Presentation 4.0 (preview)](https://preview.iiif.io/api/prezi-4/presentation/4.0)
- [IIIF Presentation 4.0 Model](https://iiif.io/api/presentation/4.0/model/)

## Metadata Policy

Metadata is optional.
Expand Down Expand Up @@ -91,6 +116,8 @@ Warnings are written to project WARNING.md.
Generated files are always overwritten on each run:

- manifest.json
- manifest-v3.json
- manifest-v4.json
- README.md
- WARNING.md

Expand Down Expand Up @@ -146,9 +173,11 @@ To reduce unnecessary workflow runs, commit messages can include these markers:

GitHub Pages should be configured to publish from the main branch.

Manifest URL pattern:
Manifest URL patterns:

- `https://{owner}.github.io/{repo}/projects/{project-name}/manifest.json`
- `https://{owner}.github.io/{repo}/projects/{project-name}/manifest-v3.json`
- `https://{owner}.github.io/{repo}/projects/{project-name}/manifest-v4.json`

## TPEN3 and Viewer Use

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "github-manifests",
"version": "0.1.0",
"private": true,
"description": "Generate IIIF Presentation 3 manifests for TPEN3/Mirador projects",
"description": "Generate IIIF Presentation 3 and 4 manifests for TPEN3/Mirador projects",
"type": "module",
"scripts": {
"generate": "node scripts/generate.js",
Expand Down
11 changes: 10 additions & 1 deletion projects/example-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ This project is generated by repository scripts.
- Optional advanced configuration in info.yml

## Generated Outputs
- manifest.json
- manifest.json (IIIF Presentation 3)
- manifest-v3.json (IIIF Presentation 3)
- manifest-v4.json (IIIF Presentation 4)
- WARNING.md

## IIIF Presentation Versions
manifest.json is the primary manifest and currently uses IIIF Presentation 3.
Set presentationVersion in info.yml to switch the primary version.
Version-pinned manifests are always available for tools that require a specific version.

## Links
- [Manifest.json](https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json)
- [Presentation 3 manifest](https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest-v3.json)
- [Presentation 4 manifest](https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest-v4.json)
- [Images folder](./images/)
- [Mirador Viewer](https://projectmirador.org/embed/?iiif-content=https%3A%2F%2FCenterForDigitalHumanities.github.io%2FGithub-Manifests%2Fprojects%2Fexample-project%2Fmanifest.json)
- [Universal Viewer](https://uv-v3.netlify.app/#?manifest=https%3A%2F%2FCenterForDigitalHumanities.github.io%2FGithub-Manifests%2Fprojects%2Fexample-project%2Fmanifest.json)
Expand Down
119 changes: 119 additions & 0 deletions projects/example-project/manifest-v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest-v3.json",
"type": "Manifest",
"label": {
"none": [
"Example Project"
]
},
"metadata": [
{
"label": {
"en": [
"Creator"
]
},
"value": {
"en": [
"Example Archivist"
]
}
},
{
"label": {
"en": [
"Date"
]
},
"value": {
"none": [
"1901"
]
}
}
],
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/1",
"type": "Canvas",
"label": {
"en": [
"External Page 1 (from info.yml)"
]
},
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/page/1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/annotation/1/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/15f769d62ca9a3a2deca390efed75d73-5_titlepage2/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg"
},
"target": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/1"
}
]
}
]
},
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/2",
"type": "Canvas",
"label": {
"en": [
"External Page 2 (via .lnk reference)"
]
},
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/page/2/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/annotation/2/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/15f769d62ca9a3a2deca390efed75d73-3_titlepage1/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg"
},
"target": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/2"
}
]
}
]
}
],
"summary": {
"en": [
"Example generated manifest for TPEN3 and Mirador testing."
]
},
"rights": "http://creativecommons.org/licenses/by/4.0/",
"requiredStatement": {
"label": {
"en": [
"Attribution"
]
},
"value": {
"en": [
"Provided by Example Institution"
]
}
},
"seeAlso": [
{
"id": "https://iiif.io/",
"type": "Dataset",
"format": "text/html"
}
]
}
119 changes: 119 additions & 0 deletions projects/example-project/manifest-v4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"@context": "http://iiif.io/api/presentation/4/context.json",
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest-v4.json",
"type": "Manifest",
"label": {
"none": [
"Example Project"
]
},
"metadata": [
{
"label": {
"en": [
"Creator"
]
},
"value": {
"en": [
"Example Archivist"
]
}
},
{
"label": {
"en": [
"Date"
]
},
"value": {
"none": [
"1901"
]
}
}
],
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/1",
"type": "Canvas",
"label": {
"en": [
"External Page 1 (from info.yml)"
]
},
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/page/1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/annotation/1/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/15f769d62ca9a3a2deca390efed75d73-5_titlepage2/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg"
},
"target": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/1"
}
]
}
]
},
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/2",
"type": "Canvas",
"label": {
"en": [
"External Page 2 (via .lnk reference)"
]
},
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/page/2/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/annotation/2/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/15f769d62ca9a3a2deca390efed75d73-3_titlepage1/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg"
},
"target": "https://CenterForDigitalHumanities.github.io/Github-Manifests/projects/example-project/manifest.json/canvas/2"
}
]
}
]
}
],
"summary": {
"en": [
"Example generated manifest for TPEN3 and Mirador testing."
]
},
"rights": "http://creativecommons.org/licenses/by/4.0/",
"requiredStatement": {
"label": {
"en": [
"Attribution"
]
},
"value": {
"en": [
"Provided by Example Institution"
]
}
},
"seeAlso": [
{
"id": "https://iiif.io/",
"type": "Dataset",
"format": "text/html"
}
]
}
11 changes: 9 additions & 2 deletions scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export const MAX_IMAGE_DIMENSION_WARNING = 5000
export const MAX_FILE_SIZE_WARNING_BYTES = 15 * 1024 * 1024
export const FETCH_TIMEOUT_MS = 15000

export const IIIF_CONTEXT = "http://iiif.io/api/presentation/3/context.json"
export const IIIF_CONTEXTS = {
3: "http://iiif.io/api/presentation/3/context.json",
4: "http://iiif.io/api/presentation/4/context.json"
}

export const SUPPORTED_PRESENTATION_VERSIONS = Object.keys(IIIF_CONTEXTS).map(Number)
export const DEFAULT_PRESENTATION_VERSION = 3

export const TOP_LEVEL_ALLOWED_INFO_KEYS = new Set([
"label",
Expand All @@ -42,5 +48,6 @@ export const TOP_LEVEL_ALLOWED_INFO_KEYS = new Set([
"start",
"thumbnail",
"resources",
"ordering"
"ordering",
"presentationVersion"
])
Loading