Image Registry
Image Registry
Each image in assets/images/gallery/ has a per-file stub here in knowledge-base/images/ capturing filename, dimensions, source, description, and cross-references to gallery manifests (HH-CLIP-*, HH-BRNG-*) and the PDF registry (_data/pdfs.yml).
Image rasters themselves are not in git — they sync from S3 via node image_sync.js. Only the stub files (and the generated _data/images.yml) are committed.
Layout
| Directory | Contents |
|---|---|
knowledge-base/images/SLUG.md |
Root gallery images |
knowledge-base/images/crops/newspaper/SLUG.md |
Newspaper-clip crops |
knowledge-base/images/crops/burnet-street/SLUG.md |
601 Delaware (Burnet Street) crops |
Citing an image in KB prose
Use a relative Markdown link to the stub file:
See the [Big Coffee Roasting Plant clipping](../images/1907-08-25-san-antonio-express-news-big-coffee-roasting-plant.md).
Stub schema
| Field | Source | Who fills it |
|---|---|---|
slug |
basename without extension | Script |
path |
relative path from repo root | Script |
basename |
filename with extension | Script |
width, height |
identify (ImageMagick) |
Script |
date |
leading YYYY-MM-DD in slug, if present |
Script |
source |
Newspapers.com URL, accession record, etc. | Curator |
description |
1–2 sentences on content/significance | Curator |
gallery_refs |
matching HH-CLIP-* / HH-BRNG-* ids |
Script |
pdf_slug |
matching entry slug in _data/pdfs.yml |
Script |
The body of each stub (everything after the closing ---) is curator-maintained: re-running the generator preserves it. The frontmatter block is machine-managed: re-running rewrites it.
Regenerating
After new images arrive (typically via newspaper-clip-intake or other workflows):
- Run
node image_sync.jsto pull new files from S3. - Run
elixir scripts/generate_image_registry.exsfrom repo root.
The script creates stubs for new images, updates frontmatter on existing stubs, and fully regenerates _data/images.yml.
Jekyll usage
Templates can look up image metadata with:
<div class="image-source">
<p class="image-source__link"><a href="/assets/images/gallery/1907-08-25-san-antonio-express-news-big-coffee-roasting-plant.jpg">View image</a></p>
</div>
Or query site.data.images directly: