Skip to content

Commit 386a64d

Browse files
TMHSDigitalclaude
andcommitted
site: carry license_spdx into the built payload
loadEntries() never copied license_spdx onto the entry object, so the field was 0/294 in data.json and data.js while the validator reported 227/294 from frontmatter. The catalog has been recording SPDX identifiers since before this session and none of them have ever reached the site or the JSON. Found by reading the deployed payload after the last push rather than by any check, which is worth noting: validate.mjs measures frontmatter and build.mjs decides what ships, and nothing compared the two. Also surfaces the identifier in the entry dialog, where the licence short name already appears. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wc67NX9MM964uaVGn4bpZJ
1 parent 6292b35 commit 386a64d

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎site/build.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ function loadEntries(vocab) {
165165
...(Array.isArray(meta.hardware_tags) ? { hardware_tags: meta.hardware_tags } : {}),
166166
...(meta.attribution_string ? { attribution_string: String(meta.attribution_string) } : {}),
167167
...(meta.publisher ? { publisher: String(meta.publisher) } : {}),
168+
...(meta.license_spdx ? { license_spdx: String(meta.license_spdx) } : {}),
168169
attributionClass: vocab.licenses[String(meta.license)]?.attribution || "any",
169170
licenseRank:
170171
ATTRIBUTION_RANK[

‎site/public/app.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@
313313
<dl class="dialog-meta">
314314
<div><dt>Category</dt><dd>${escapeHtml(cat)}</dd></div>
315315
${entry.publisher ? `<div><dt>Publisher</dt><dd>${escapeHtml(entry.publisher)}</dd></div>` : ""}
316+
${entry.license_spdx ? `<div><dt>SPDX</dt><dd>${escapeHtml(entry.license_spdx)}</dd></div>` : ""}
316317
<div><dt>Attribution</dt><dd>${escapeHtml(String(entry.attribution_required))}</dd></div>
317318
<div><dt>Formats</dt><dd>${escapeHtml((entry.formats || []).join(", ") || "—")}</dd></div>
318319
<div><dt>Tags</dt><dd>${escapeHtml((entry.tags || []).join(", ") || "—")}</dd></div>

0 commit comments

Comments
 (0)