Describing a collection to visitors
A site opens on a wall of images to wander through, suggests searches, shows each object once however many photographs it has, and gives every image its own page with similar images and a link back to the institution’s own record.
Put a collection.json next to the index, in the folder passed to --data-dir, to set the title, the introduction, the suggested searches, the institution, the license and the footer links. collection.example.json shows the common fields, and all of them are optional.
- A suggested search is either the query itself or
{"query": "...", "label": "..."}, whose label is shown beside it, for example to say how Auto reads it. object_labelnames what one object is, such asmap sheet, in the count under the title. The count leaves out the number of images when each object has one, and the institution when the title already names it.institutionnames who holds the collection, in the link to each record (“View the full record at the Smithsonian”);source_nameis its old name and still works.groupsgives each group of a collection split into groups its own label, institution and license, andgroup_labelsays what a group is, such asMuseum. See Several institutions in one site.field_labelsrenames catalog columns on an object’s page, such as{"creation_date": "Date"}.- The site reads the file on every visit, so a change shows up without a restart.
- The same file fills the page title and description that search engines show, and the site’s
llms.txt.
For a deployed site, pass the file when installing with --collection-file, or change it later while the site keeps running:
sudo deploy/bootstrap.sh describe --name my-collection --collection-file collection.jsondeploy/aws/describe.sh my-collection --file collection.jsonObjects and links back
Section titled “Objects and links back”The link back to the original record is taken from the catalog: a column named source_url, guid, record_url, landing_page or permalink that holds a web address. Images are grouped into objects by a column named object_id, record_id or item_id.
Collections without a catalog work too. Every image is then its own object, shown as having no catalog record, and is found by what it shows. Mapping your data says how each catalog column is shown, searched and filtered.