We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path-to-regexp
The headless static site needs to know how to extract IDs from URLs in order to map remote resources.
For example:
https://iiif.wellcomecollection.org/presentation/b30496974
This points to a IIIF Manifest, we want to be able to extract:
b30496974
And also optionally add a prefix, so that on the headless static site output it can be found at:
/manifests/wellcome-b30496974
In order to this currently we have a configuration object that must be specified by the user:
slugs: wellcome-manifest: type: Manifest domain: iiif.wellcomecollection.org prefix: /presentation/ addedPrefix: wellcome- examples: - https://iiif.wellcomecollection.org/presentation/b30496974
An alternative might be possible with Path to regex which is fast.
Here is the current store configuration, which references the slugs config above.
wellcomePaintings: type: iiif-remote url: https://iiif.wellcomecollection.org/presentation/collections/digitalcollections/digpaintings slugTemplates: - wellcome-manifest - wellcome-collection
With path-to-regex it could be:
wellcomePaintings: type: iiif-remote url: https://iiif.wellcomecollection.org/presentation/collections/digitalcollections/digpaintings router: - from: https://iiif.wellcomecollection.org/presentation/collections/{*collectionPath} to: /collections/{*collectionPath} - from: https://iiif.wellcomecollection.org/presentation/{manifestId} to: /manifests/wellcome-{manifestId}
That would greatly simplify both the configuration and implementation.
With this configuration, if a static page was requested:
The configuration provides enough information to match it against the router.
from: https://iiif.wellcomecollection.org/presentation/{manifestId} +to: /manifests/wellcome-{manifestId}
And then find the original manifest to fetch:
https://iiif.wellcomecollection.org/presentation/{manifestId}
Fetching:
It would also still have the original path to fetch the meta.json and indices.json which are not hosted at Wellcome:
meta.json
indices.json
/iiif/manifests/wellcome-b30496974/meta.json /iiif/manifests/wellcome-b30496974/indices.json
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The headless static site needs to know how to extract IDs from URLs in order to map remote resources.
For example:
This points to a IIIF Manifest, we want to be able to extract:
And also optionally add a prefix, so that on the headless static site output it can be found at:
In order to this currently we have a configuration object that must be specified by the user:
An alternative might be possible with Path to regex which is fast.
Here is the current store configuration, which references the slugs config above.
With path-to-regex it could be:
That would greatly simplify both the configuration and implementation.
With this configuration, if a static page was requested:
The configuration provides enough information to match it against the router.
from: https://iiif.wellcomecollection.org/presentation/{manifestId} +to: /manifests/wellcome-{manifestId}
And then find the original manifest to fetch:
Fetching:
It would also still have the original path to fetch the
meta.json
andindices.json
which are not hosted at Wellcome:The text was updated successfully, but these errors were encountered: