digirati-co-uk / delft-static-site-generator

Generates static sites from IIIF Manifests.
MIT License
8 stars 6 forks source link

Del-64/collections #62

Closed ionab closed 4 years ago

ionab commented 4 years ago

This PR, allows the management of manifests through the user of the file system.

Previous behaviour:

  1. A collection json file would be specified. Part of this json file would specify the items(type array) detailed within this collection, including the thumbnail, labels and so on.
  2. Objects belonging to an object would be contained within an objects folder and could be present within any number of collections.

This PR retains the previous behaviour to allow for custom modifications (such as control over labels for each item in the collection, collection order, referencing an object within another collection and so forth) but adds the following:

  1. The ability to create a collection, by providing a condensed collection specification for example: { "label": { "en": [ "OTB" ], "nl": [ "OTB" ] }, "summary": { "en": [ "Photo archive of OTB – Research for the Built Environment, Faculty of Architecture and the Built Environment" ], "nl": [ "Fotoarchief van OTB – Onderzoek voor de gebouwde omgeving, Faculteit Bouwkunde" ] }, "metadata": [ { "label": { "none": [ "" ] }, "value": { "none": [ "" ] } } ], "type": "Collection", "id": "https://delft-static-site-generator.netlify.com/collections/tu-bk-otb-fotoarchief", "@context": [ "http://www.w3.org/ns/anno.jsonld", "http://iiif.io/api/presentation/3/context.json" ] }

  2. In order for this collection to be created with items belonging to it, a folder is should be created by the same name, ie. if you called your collection json file collection1.json the folder should be called collection1. The manifest objects within this folder will make up the collection.

  3. This PR generates an object page for each of the manifests detailed within both the objects page and within the collections directory, and maintains links to these objects through publication modals, and exhibitions as well as from the collections themselves.

netlify[bot] commented 4 years ago

Deploy preview for delft-static-site-generator ready!

Built with commit 023f85d69ce61f6d0b85fc5afda95f8b6ed849d5

https://deploy-preview-62--delft-static-site-generator.netlify.app

stephenwf commented 4 years ago

@sammeltassen A link to the directory structure: https://github.com/digirati-co-uk/delft-static-site-generator/tree/2ed0b2cb4f18b91e2613577198bcd21f4530ee19/content/collections

ionab commented 4 years ago

@sammeltassen I've integrated the feedback, where collections orders are now ordered by a prefix number. So object1-bcfeg.json will appear before 2-abc.json in the collection order. The urls to the site will not be affected by the numerical prefix. If no number is specified, they'll just be alphabetical as before. @stephenwf FYI

ionab commented 4 years ago

Works well! Two questions:

* I noted that the relationships between objects and collections is not working in this branch. Is this due to these changes? Perhaps this is something to look at before merging.

* Will the static site generate a new full iiif-collection json in order to be able to share the collection? Or is this something we need to solve later?

@sammeltassen, Yes I will need to do some merging of the work that has been done since I worked on this branch before I merge it into develop.

As for generating a whole IIIF collection - no, it won't the static site just renders it.

As for the changes to the location of the IIIF - do you want me to move the IIIF which I have changed as part of this PR for demonstration purposes or leave it where it was? You have the option to have it in either place... the old way or the new way as per this PR.

sammeltassen commented 4 years ago

@ionab Please keep the changed files/file structure of this branch when merging. There might be some minor trouble later when merging into master because I edited one of the collections; I can take a look then.