You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8bcfdca
Browse filesBrowse the repository at this point in the historyBrowse files
feat(api): resolve a reference by work and locator without its UUID (#84) (#88)
Publish the reference lookup as data. Each work gets a locator index at
/reg/work/{key}/aliases.json that maps a locator to its reference UUID,
grouped by citation system key, so a client resolves a passage in two
fetches and needs no UUIDv5 implementation of its own.
Publish the complete alias table at /dump/aliases.json, and register it in
datapackage.json with a byte count and a sha256 hash. data/README.md and
data/.gitignore both named that artifact already; no code wrote it.
Split writeDump() into pure halves so a plain JSON resource fits beside the
four JSONL ones. Sort the alias keys, so the body and its hash depend on
the registry content alone. Add the new file to the release workflow, which
sets fail_on_unmatched_files.
Correct the four contract statements that the new artifacts falsify: the
Collections tag, the Bulk tag, the datapackage resource count, and the
claim that every .json body is JSON-LD by content.
Largest emitted index is tanakh at 1.12 MB, under the agreed 2 MB cap, so
no pagination. All 67,959 references are reachable from their work index,
and the four JSONL bodies are byte-identical to staging.
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Husky installs on `npm install`: Prettier runs on staged files, `commitlint` enf
24
24
-`src/content/docs/{association,standard,api,community,get-started}/` — site sections (autogenerated sidebar)
25
25
-`src/content/docs/de/` — German mirror (see Localization)
26
26
-`src/pages/id/{work,system,ref,mapping}/` — canonical record pages (`/id/.../` HTML and `.json` JSON-LD siblings)
27
-
-`src/pages/reg/` — registry browser (index + paginated reference lists); does not host individual records
27
+
-`src/pages/reg/` — registry browser (index + paginated reference lists), the registry-wide JSON-LD collections, and the per-work locator index (`/reg/work/{key}/aliases.json`); does not host individual records
28
28
-`src/pages/cite/` — short-alias redirects (`/cite/{work}/{system}/{locator}` always; bare `/cite/{work}/{locator}` for a work's preferred citation system, and retargetable if that preference changes) → canonical `/id/` URL
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,19 +71,19 @@ Prerequisites: Node 24 and npm.
71
71
72
72
Configuration lives in `.env`; use [`.env.example`](./.env.example) as the starting point. `SITE_DOMAIN` controls Astro's canonical `site` URL and defaults to `textrefs.org` when unset.
|`npm run dev`| Start local dev server at `localhost:4321`|
78
-
|`npm run build`| Build the production site to `./dist/`|
79
-
|`npm run build:fast`| Build the site against a tiny fixture registry, without compiling full data |
80
-
|`npm run preview`| Preview the build locally |
81
-
|`npm run compile:data`| Read hand-authored YAML under `data/works/` and `data/systems/`, expand the in-memory registry, and emit JSONL resources plus`datapackage.json` under `dist/dump/`|
82
-
|`npm run validate:data`| Validate every compiled record against the canonical Zod schemas |
83
-
|`npm run build:data`|`compile:data` then `validate:data` — the contributor data pipeline |
84
-
|`npm run verify:fast`| Fast local check using fixture registry data |
85
-
|`npm run verify`| Prettier + `astro check` + tests + production build — the CI gate |
86
-
|`npm run changelog`| Regenerate `CHANGELOG.md` from git history (git-cliff) |
|`npm run dev`| Start local dev server at `localhost:4321`|
78
+
|`npm run build`| Build the production site to `./dist/`|
79
+
|`npm run build:fast`| Build the site against a tiny fixture registry, without compiling full data |
80
+
|`npm run preview`| Preview the build locally |
81
+
|`npm run compile:data`| Read hand-authored YAML under `data/works/` and `data/systems/`, expand the in-memory registry, and emit JSONL resources, the alias table, and`datapackage.json` under `dist/dump/`|
82
+
|`npm run validate:data`| Validate every compiled record against the canonical Zod schemas |
83
+
|`npm run build:data`|`compile:data` then `validate:data` — the contributor data pipeline |
84
+
|`npm run verify:fast`| Fast local check using fixture registry data |
85
+
|`npm run verify`| Prettier + `astro check` + tests + production build — the CI gate |
86
+
|`npm run changelog`| Regenerate `CHANGELOG.md` from git history (git-cliff) |
87
87
88
88
Contributors edit the YAML under [`data/works/`](https://github.com/textrefs/registry/tree/main/works) and [`data/systems/`](https://github.com/textrefs/registry/tree/main/systems); the directory is a git submodule pointing at [`textrefs/registry`](https://github.com/textrefs/registry). Run `git submodule update --init --recursive` after cloning. The compiler expands the pinned submodule into the flat registry dump (works, systems, refs, mappings) under `dist/dump/`. See [`docs/get-started/authoring`](https://textrefs.org/get-started/authoring/) for the format. For documentation, styling, and route work, use `npm run verify:fast` locally; run the full `npm run verify` before PRs that touch registry data, release output, production build behaviour, or CI behaviour.
0 commit comments