Configuration
The Canopy IIIF build process is configured at config/canopy.json
if it exists. If this configuration file has not been created, the default configuration config/.default/canopy.default.json
will be used as a fallback for demonstration purposes.
See the Create a Project guide for a step-by-step guide illustrating the setup of Canopy IIIF project.
Configuration options
Canopy IIIF is a highly configurable application that can be tailored to the needs of a project. Canopy configurations fallback to default settings if not customized.
Properties
A custom Canopy configuration is created at config/canopy.json
. The file must be a valid JSON and contain a collection
property with a valid IIIF Collection URI.
Property | Type | Description |
---|---|---|
collection | string | IIIF Collection URI |
devCollection | string | IIIF Collection URI |
label | label | IIIF Presentation 3.0 label property |
summary | summary | IIIF Presentation 3.0 summary property |
featured | Array<string> | Array of IIIF Manifest URIs |
metadata | Array<string> | Array of metadata labels |
collection
The collection
property is required and must be the URI of the referenced source IIIF Collection. Also, the id
property on the IIIF Collection must match this value. Collections referencing other Collections in their items
property are not currently supported.
"collection": "https://api.dc.library.northwestern.edu/api/v2/collections/1c2e2200-c12d-4c7f-8b87-a935c349898a?as=iiif&size=500"
devCollection
The optional devCollection
property is used only when running the development server using npm run dev
. Like collection
, the value must be the URI of the referenced source IIIF Collection and must match its id
. The devCollection
property is useful when working with a large IIIF Collection and you want to target a smaller subset of the collection for development purposes.
"devCollection": "https://api.dc.library.northwestern.edu/api/v2/collections/1c2e2200-c12d-4c7f-8b87-a935c349898a?as=iiif&size=25"
label and summary
The Canopy IIIF site title and description respectively default to the label
and summary
(if set) IIIF Presentation API properties of the source IIIF Collection resource. You can optionally override these values by providing valid Presentation 3.0 label (opens in a new tab) and summary (opens in a new tab) properties. These values are transformed to meta elements in the <head>
of the HTML document.
"label": {
"none": ["Maps of Africa, 1561-1908"]
},
"summary": {
"none": [
"113 antique maps of Africa and accompanying text dating from the mid-16th Century to the early 20th Century."
]
}
featured
You can inform Canopy IIIF of featured Manifests by providing an array of Manifest URIs matching the id
value of resources in your source IIIF Collection. These must be referenced within the source IIIF Collection resource and the Manifest URIs must be an exact string match. These Manifests will render throughout the interface in featured components.
Warning: In the current release, featured Manifests must have an Image body on the first Canvas.
"featured": [
"https://api.dc.library.northwestern.edu/api/v2/works/24395a20-5054-4ad1-8dd8-04a230f4740b?as=iiif",
"https://api.dc.library.northwestern.edu/api/v2/works/0792fb69-efc3-4793-90e0-97362c67ac0e?as=iiif"
]
metadata
Curating Metadata allows implementers of Canopy IIIF to select metadata fields that provide additional access points to end users. The fields can be specified by listing the labels of each metadata property found in the metadata
property of the manifest. Metadata labels that are curated will be automatically included as featured elements on the homepage, the metadata page, linking from works, and as facets on the search page. An optimal case is a label common to all or most manifests with some in diversity of values across those resources.
Note: Metadata labels are not yet BCP 47 language code aware; however, aggregation processes will make exact string comparisons regardless of language code.
"metadata": ["Subject", "Date", "Language", "Creator", "Publisher"]
Example configuration
The following is an example configuration for the 16th-Early 20th Century Maps of Africa (opens in a new tab) provided by Northwestern University Libraries.
- A
devCollection
value is provided to target a smaller subset of 15 items for development purposes. - Two Manifests are
featured
and fivemetadata
labels are curated. - The
label
andsummary
properties are overridden to provide custom values for the site title and description.
{
"collection": "https://api.dc.library.northwestern.edu/api/v2/collections/1c2e2200-c12d-4c7f-8b87-a935c349898a?as=iiif&size=500",
"devCollection": "https://api.dc.library.northwestern.edu/api/v2/collections/1c2e2200-c12d-4c7f-8b87-a935c349898a?as=iiif&size=25",
"featured": [
"https://api.dc.library.northwestern.edu/api/v2/works/24395a20-5054-4ad1-8dd8-04a230f4740b?as=iiif",
"https://api.dc.library.northwestern.edu/api/v2/works/0792fb69-efc3-4793-90e0-97362c67ac0e?as=iiif"
],
"metadata": ["Subject", "Date", "Language", "Creator", "Publisher"],
"label": {
"none": ["Maps of Africa, 1561-1908"]
},
"summary": {
"none": [
"113 antique maps of Africa and accompanying text dating from the mid-16th Century to the early 20th Century."
]
}
}
Minimal configuration
The following is a minimal configuration for Canopy IIIF. This is a valid configuration intended for experimentatal and demonstration purposes, however, it is not recommended for production use.
{
"collection": "https://api.dc.library.northwestern.edu/api/v2/collections/1c2e2200-c12d-4c7f-8b87-a935c349898a?as=iiif&size=500"
}