Skip to content

Commit fc33cf5

Browse files
magicmarkclaude
andcommitted
Fix authors rendering as [object Object] on website
The authorName helper assumed string authors but metadata now uses objects. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 648e906 commit fc33cf5

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

scripts/build-website.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ function titleCase(value) {
9191
.join(" ");
9292
}
9393

94-
function authorName(author) {
95-
const match = String(author).match(/^\s*(.*?)\s*<[^>]+>\s*$/);
96-
return match ? match[1] : String(author);
97-
}
9894

9995
const readTemplate = memoize(async (name) => {
10096
const templatePath = join(templatesDir, name);
@@ -144,7 +140,7 @@ async function renderGapMeta(gap) {
144140
const gapMetaTemplate = await readTemplate("gap-meta.html");
145141
const items = [
146142
{ label: "Status", value: titleCase(gap.status) },
147-
{ label: "Authors", value: gap.authors.map(authorName).join(", ") },
143+
{ label: "Authors", value: gap.authors.map((a) => a.name).join(", ") },
148144
{ label: "Sponsor", value: gap.sponsor },
149145
];
150146

@@ -284,7 +280,7 @@ async function buildGap(gapDir, outDir) {
284280
frontmatter: {
285281
[gapName]: gapMetadata.title,
286282
Version: document.label,
287-
Authors: gapMetadata.authors.map(authorName).join(", "),
283+
Authors: gapMetadata.authors.map((a) => a.name).join(", "),
288284
Discussion: gapMetadata.discussion,
289285
},
290286
});

0 commit comments

Comments
 (0)