Skip to content
Vitrine

Documentation

Content

Two collections, defined and type-checked in src/content.config.ts. pnpm dev and pnpm build both fail with the file name and the field when frontmatter does not match, so the schema is the first place to look when a build stops.

  • src/content/objects/*.mdx — one file per object. This is the catalogue.
  • src/content/collections/*.md — the archive’s own divisions.

Delete the samples when you start your own archive; nothing in the code refers to them by name.

An object

---
title: 'Mechanical table'
image: '../../assets/objects/riesener-mechanical-table-1781.webp'
caption: 'Cabinetwork'
dateText: 'ca. 1781'
year: 1781
medium: 'Oak veneered with mahogany, gilt bronze, steel'
dimensions: '80.6 × 111.4 × 64.1 cm'
accession: '33.12'
collection: 'cabinetwork'
terms: ['Paris', 'Marquetry', 'Mechanical furniture']
span: 2
featured: true
credit: 'Photograph: the archive'
---

The top rises on a rack worked from the side, and the writing surface comes
forward with it.
Field Required Notes
title ✓ Also the alt text of the plate
image ✓ Path relative to the file, resolved through astro:assets. Cut out or shot on white: the plate sets the object inside the cell, so any aspect ratio works and nothing is ever cropped. The edge of the photograph is faded into the paper, so a sweep that is not quite white does not print as a rectangle
caption ✓ The line above the cell. A label, not a sentence: “Glass”, “Cabinetwork”
dateText ✓ Printed exactly as written — ca. 1600, 1893–96, undated. The display string is the required field because a catalogue dates things in prose
year A number, used for sorting and for the chronology. The catalogue is arranged by collection and then by year; undated entries sort to the end of their collection, by title
medium ✓ First line of the cartellino
dimensions Printed on the entry page
accession Your own catalogue number. Left out, the entry is numbered by where it falls — collection 02, third entry, is 02-03. catalogue.showAccession hides numbers everywhere
collection ✓ The id of a file in src/content/collections/ — its filename without the extension. A name that does not exist fails the build
terms Pro. Index terms; see below
figures Pro. Further plates; see below
references Pro. Provenance, exhibition and literature; see below
credit Photograph or lender credit, printed small under the entry
span 1 or 2. A 2 takes a double-width cell in the grid
featured Eligible for the home page plate
draft true keeps the entry off every page. The photograph is another matter — see below

The body of the file is the note, printed under the object. It is MDX, so a component import works, but a note is usually a paragraph or two.

Work not ready to be seen

draft: true keeps an entry out of the catalogue, the collections, the index and the search. It does not keep its photograph out of dist/: the file is still read, so the image is still registered and still built, unlinked but downloadable by anyone who guesses the name.

Objects under src/content/objects/_drafts/ are not read at all, which is where an object that must not leave the building belongs. Move the file back up a level when it is ready — the image path goes back from ../../../assets/ to ../../assets/ — and the entry is catalogued from that build on.

Both, together, are the safe habit: the folder for the photograph, draft: true for the entry, so a file moved up before its note is finished still does not print.

Index terms (Pro)

terms: ['Augsburg', 'Gilt silver', 'Toilet service']

Terms are the catalogue’s second axis. A collection holds an object; a term crosses collections — maker, place, technique, workshop, material. They are not tags: nothing is filed under a term except by writing it, and the whole of /index/ (the A–Z, the term pages, the count of collections each term reaches) is built from what you write. Spelling is identity, so Gilt silver and gilt silver are two terms.

The chronology on the same page is built from year, by decade. Objects without a year do not appear in it.

Further plates (Pro)

figures:
  - src: '../../assets/figures/augsburg-toilet-set-case.webp'
    caption: 'The case closed'
  - src: '../../assets/figures/augsburg-toilet-set-tray.webp'
    caption: 'The cover lifted: the service in its fitted tray'

The case it travels in, the mechanism open, the reverse. The caption is required: a second view nobody explains is a photograph rather than a plate.

Every plate, including the main one, opens enlarged in a dialog. The enlargement stops at the file’s own pixel size — with the 1000px sample images there is little to gain, and with your own 2000px photographs there is.

Registers (Pro)

references:
  - kind: 'provenance'
    text: 'Bequest of Catherine D. Wentworth, 1948'
  - kind: 'exhibition'
    text: 'Paris, Musée des Arts Décoratifs, 1955, no. 118'
  - kind: 'literature'
    text: 'Verlet, French Royal Furniture, 1963, pp. 84–86'
    href: 'https://example.org/record/1234'

One array rather than three fields; the entry prints them grouped under Provenance, Exhibited and Literature, in that order, and an object with none prints no apparatus at all. kind must be one of those three. href is optional and makes the line a link to the record it can be checked against.

Footnotes (Pro)

Ordinary GitHub-flavoured Markdown in the body of an object note or a collection essay:

The mounts are later[^1].

[^1]: Compared with the 1781 inventory description, which lists none.

They render as a numbered register under a rule, with a link back to the place in the text.

A collection

---
title: 'Silver'
description: 'Raised, cast and gilded work, dated by the marks struck into it.'
order: 2
cover: '../../assets/objects/burghley-ewer.webp'
---

Marks first. Where the punches can be read, the date on the plate is the assay
date and the entry is as exact as the year letter allows.
Field Required Notes
title ✓
description ✓ One paragraph, printed above the plates and used as the page description
order A positive integer. Sections of a catalogue are arranged, not alphabetised; files without an order follow the numbered ones
cover Pro. The plate the finder prints when a section comes back from a search. Without one the section’s first plate is used

The body is the section essay (Pro): if the file has one, it is printed above the collection’s plates, in the same measure as an object note, footnotes and all. Leave the body empty and the page starts at the grid.

The description and the essay are indexed (Pro): a section is an entry in the search index alongside the objects, found by its own words rather than by its plates. It carries no collection or decade filter, so narrowing by a chip still answers with objects only.

The filename is the id: silver.md is referenced as collection: 'silver' and lives at /collections/silver/.

Images

Put them in src/assets/ — objects/ for plates, figures/ for further views — and reference them with a relative path. Astro hashes, resizes and converts them at build time; nothing in src/assets/ is served as you wrote it, and nothing belongs in public/ except the favicon and the default share image.

WebP at around 1600px on the long side is a good target: large enough for the enlargement to mean something, small enough that the catalogue page stays fast.

Search (Pro)

The index is built by Pagefind after the site is built, so search works in pnpm preview and in production but not in pnpm dev, where the page says so. Two kinds of page are indexed: every object entry, and every collection — its lead paragraph and its essay. A section comes back as a plate like anything else, drawn with its cover or its first object, and labelled with what it holds.

The fields a result is drawn from — the thumbnail, the title, the cartellino — are data-pagefind-* attributes on src/pages/catalogue/[id].astro and src/pages/collections/[id].astro. If you restructure either page, check them at the same time.

Feed, sitemap, share cards

/rss.xml lists the catalogue in order. /sitemap-index.xml is generated at build and excludes /search. Each object also gets a 1200×630 share card at /og/<id>.jpg (Pro), drawn from its plate at build time; pages without a plate fall back to site.defaultOgImage.

Next: Customization