Link roundup posts from Shelf cards and keep long link lists short

Shelf game cards show the post about the game, as Library rows already
do. A make's chip prefers its own build log and says Blog for other
posts. Post chips and Connected pages count the links past the first
few, so a roundup linking a hundred items stays readable.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012aSbo2D1qP8cMFQCykf7kx
This commit is contained in:
Claude
2026-10-18 17:08:43 +00:00
parent b3cf6bd02e
commit 57721efbcd
10 changed files with 89 additions and 20 deletions
+6
View File
@@ -52,6 +52,12 @@ export function buildLogs(s: SiteIndex, craft: Note<"craft">): Note<"post">[] {
return s.backlinks(craft, { type: "post" }) as Note<"post">[];
}
/** The post a make links to: its own build log first, else the newest post about it. */
export function makeLog(s: SiteIndex, make: Note<"make">): Note<"post"> | undefined {
const posts = s.backlinks(make, { type: "post" }) as Note<"post">[];
return posts.find((p) => p.data.postType === "build log") ?? posts[0];
}
/** The tools of a craft, as notes where published, in the craft's order. */
export function toolsOf(s: SiteIndex, craft: Note<"craft">): { title: string; note?: Note<"tool"> }[] {
return (craft.data.tools ?? []).map((t) => {