From 952e0380c028ea99014b18d7cde3c246891f6bcb Mon Sep 17 00:00:00 2001 From: Christian Larios Date: Fri, 26 Jun 2026 19:10:31 -0600 Subject: [PATCH] fix(mdcode): read and write the OKF spec `timestamp` frontmatter key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documents layout used a camelCase `timeStamp` key for both parse and serialize, but OKF SPEC ยง4.1 and every published bundle use `timestamp`. As a result the layout silently dropped the timestamp when reading spec-conformant bundles and emitted a key no other OKF tool recognizes. --- toolbox/mdcode/src/libts/layouts/documents.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolbox/mdcode/src/libts/layouts/documents.ts b/toolbox/mdcode/src/libts/layouts/documents.ts index 84b4e79..b1abb20 100644 --- a/toolbox/mdcode/src/libts/layouts/documents.ts +++ b/toolbox/mdcode/src/libts/layouts/documents.ts @@ -209,10 +209,10 @@ export function parseMarkdown(content: string): { entry: md.Entry|null; body: st entry.resource.labels[tag] = 'true'; } } - if (metadata.timeStamp) { - entry.resource.updateTime = metadata.timeStamp; + if (metadata.timestamp) { + entry.resource.updateTime = metadata.timestamp; if (!entry.resource.createTime) { - entry.resource.createTime = metadata.timeStamp; + entry.resource.createTime = metadata.timestamp; } } @@ -237,7 +237,7 @@ export function toMarkdown(entry: md.Entry, body: string): string { title: entry.resource.displayName ?? entry.resource.name, description: entry.resource.description ?? undefined, tags: tags.length ? tags : undefined, - timeStamp: entry.resource.updateTime ?? entry.resource.createTime ?? undefined, + timestamp: entry.resource.updateTime ?? entry.resource.createTime ?? undefined, catalogEntry: entryClone };