The datasets catalogue: how it's built
The public catalogue at atlas.sovereignsky.no/datasets is generated at build time from the per-source manifests. No content lives only in the website repo — every page on the catalogue is reproducible from atlas-data/ingest/src/sources/.
This page is for contributors who touch the catalogue's plumbing: adding topics, adding publishers, evolving the generator, or wiring new components into the per-dataset page.
For the "how do I add a dataset" workflow, see adding-a-source.md — Step 4b covers the manifest + regenerate dance.
A note on vocabulary: inside atlas-data/ the unit is called a source (source_id, raw.<source_id>, the sources/ folder). On the public site it's a dataset, topic, and publisher. Same things, different audience-appropriate names. See PLAN-catalog-vocabulary for the rationale.
What's generated vs hand-authored
| Surface | Path | Authored by |
|---|---|---|
| Per-dataset product detail page | docs/datasets/<source-id>.mdx × 41 | Generated by sources:generate |
| Per-topic index | docs/topics/<id>.mdx × 7 | Generated |
| Per-publisher brand page | docs/publishers/<id>.mdx × 4 | Generated |
| Registry JSON (consumed by React components) | src/data/sources-registry.json | Generated |
| Catalogue homepage | src/pages/index.tsx | Hand-authored |
| Datasets index (browse all) | docs/datasets/index.mdx | Hand-authored |
| Topics index | docs/topics/index.mdx | Hand-authored |
| Publishers index | docs/publishers/index.mdx | Hand-authored |
| React components | src/components/sources/*.tsx | Hand-authored |
| Topic metadata | atlas-data/ingest/src/sources/topics.yaml | Hand-authored |
| Publisher metadata | atlas-data/ingest/src/sources/publishers.yaml | Hand-authored |
Generated files carry a {/* Generated by website/scripts/generate-sources-registry.mjs */} marker on the first MDX line. Don't hand-edit those files — your change will be overwritten next time someone touches a manifest.
The generator
website/scripts/generate-sources-registry.mjs is the single entry point.
cd website
npm run sources:generate
What it does:
- Walks every
atlas-data/ingest/src/sources/<id>/manifest.yml. - Loads
publishers.yamlandtopics.yaml. - Reads each source's
README.md; extracts the section under## Atlas summary(case-insensitive) if present. - Resolves
publisher:→ publisher object andtags.topic→ topic object so consumers don't need to join. - Computes
related_by_topic(other same-topic source_ids, alphabetical, capped at 6). - Builds a default
sample_queryURL when the manifest doesn't supply one (first raw table +?limit=5). - Builds the citation text + BibTeX for each dataset, including the Atlas permalink
/datasets/<id>. - Resolves the effective
feedback_url(manifest override > publisher default). - Writes
src/data/sources-registry.json(single file, deterministic). - Scrubs stale generated MDX in each output dir so renames / deletions don't leave orphans.
- Writes per-dataset / per-topic / per-publisher MDX to the three output dirs.
The generator is also wired to prebuild — npm run build always regenerates before building, so local previews are never stale.
Adding a new topic
When a new domain doesn't fit the existing 7 topics:
- Add an entry to
atlas-data/ingest/src/sources/topics.yamlwithid,name,description,emoji,order. TheidMUST match what any manifest'stags.topicfield uses — the manifest validator rejects mismatches. - Run
cd website && npm run sources:generate. The generator emits a newdocs/topics/<id>.mdx. - Add the new topic id to
sidebars.tsunder the "By topic" submenu (Atlas keeps the order explicit, not autosorted byorder). - Discuss in the PR — topics are editorial and we keep the list short.
Adding a new publisher
- Add a
<id>.svgtowebsite/static/img/publishers/. Placeholder text-wordmarks are acceptable for v1; replace with the publisher's official asset once licensed. - Add an entry to
atlas-data/ingest/src/sources/publishers.yamlwithid,display_name(must exactly match thepublisher:string in every manifest from that publisher — validator cross-checks this),homepage,logopath,feedback_url,notes. - Run
cd website && npm run sources:generate. The generator emitsdocs/publishers/<id>.mdx. - Add the new publisher id to
sidebars.tsunder the "By publisher" submenu.
Adding a new component to the per-dataset page
If you want to render something new on every per-dataset page (e.g. a "Used in N Atlas models" badge):
- Write the component under
src/components/sources/<Name>.tsx. Read from typed registry data viasrc/utils/sources.tshelpers — don't fetch. - Update the MDX template in
generate-sources-registry.mjs(therenderSourceMdxfunction) to import and render your component. - Run
npm run sources:generate— every per-dataset page picks up the new component on regeneration. - Stable anchor IDs are a contract —
#provenance,#in-atlas,#joined-with,#methodology,#dimensions,#sample-query,#citation,#related. Renaming any of these is a breaking change for anyone deep-linking into Atlas (sister documents, third-party tools, LLM crawlers).
The CI gate
Two jobs in .github/workflows/check-manifests.yml:
check-manifests— manifest shape + cross-file resolution. See check-manifests.md.check-catalog— runs the generator andgit diff --exit-codeagainst committed output. Fails if a manifest was edited without re-running the generator.
Both jobs fail the PR if anything's off. The fix message names the exact command to run locally.
What's NOT in PLAN-002 / PLAN-catalog-vocabulary
PLAN-002 shipped the structural shell; PLAN-catalog-vocabulary fixed the public terminology. PLAN-003 adds the merchandising layer:
- Curated collections at
/datasets/collections/<slug> - Use-case persona pages at
/datasets/for/<persona> - "Featured / dataset of the week" hero on the homepage
- "New & recently refreshed" strip + per-page RSS feed
- Social-proof badges ("Used in N Atlas models", citation counts)
- Sample-row preview tables
- Sparkline of time coverage; Norway thumbnail map by
geo_resolution_level
When PLAN-003 lands, this doc will gain corresponding sections.
Cross-references
- adding-a-source.md — end-to-end contributor workflow; Step 4b covers manifest + regenerate.
- check-manifests.md — the manifest shape gate.
- INVESTIGATE-sources-catalog-at-scale.md — design rationale, persona research, web-shop reframe.
- PLAN-002-sources-catalog-foundation.md — the plan that shipped this catalogue.
- PLAN-catalog-vocabulary.md — the plan that renamed the public terminology.