From f23f9278f30a0218403411a710c6b96bb39cbfcd Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 13 Oct 2026 18:44:20 +0200 Subject: [PATCH] feat(wiki): link a list page to the topics it belongs to A list page showed its items and nothing else, so a list started for a topic gave no way back to that topic and its records. The page header now marks it as a list and links every topic the list names, the same way a record's header links its topics. --- stacklets/memory/quartz/components/familyModel.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stacklets/memory/quartz/components/familyModel.ts b/stacklets/memory/quartz/components/familyModel.ts index ec18ded3..b948d5f2 100644 --- a/stacklets/memory/quartz/components/familyModel.ts +++ b/stacklets/memory/quartz/components/familyModel.ts @@ -771,6 +771,15 @@ function build(ctx: BuildCtx, allFiles: QuartzPluginData[]): Model { } const updated = f?.dates?.modified if (m.type === "person") return { kicker: [L.person], meta: alsoKnownAs(m), date: updated, chips: [] } + // A list names the topics it belongs to; its page links back to them. + if (m.type === "list") { + const named = asList(m.topics).map((t) => topicIdx.get(fold(t)) ?? t) + const chips = named + .map((e) => (typeof e === "string" ? topics.get("room:" + e) : topics.get(e.id))) + .filter((t): t is Topic => !!t?.slug) + .map((t) => ({ label: t.label, slug: t.slug })) + return { kicker: [L.list], meta: [], date: updated, chips } + } if (m.type === "correspondent") return { kicker: [L.sender], meta: alsoKnownAs(m), date: updated, chips: [] } if (m.type === "topic") { const t = [...topics.values()].find((x) => x.slug === slug)