Add a blog: posts at /blog/:id and a Community page section

Admin → Blog → Posts (migration 031): our own posts with a
content-block body, cover image, excerpt, date, tags, and authors
shown as person tiles, either People records or a guest name and
photo. A post is a draft until published; Listed works as it does
elsewhere. Posts are on the QR page too.

Admin → Blog → Community section: the first section of the
Community page, with its heading and blurb from the admin, in two
halves, each pinned first and then newest up to its slots. Our posts
come from blog_posts; community posts are pinned link or video cards
(reusing featured cards and Fetch preview), then the newest items
from a list of RSS or Atom feeds. Feeds are read through the link
preview's guarded fetch and cached for 30 minutes, and a failing feed
keeps its last good items.

content_blocks and featured_cards are rebuilt to accept the new owner
kinds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 16:27:00 -05:00
parent d4f65d93b4
commit d374f9ac17
21 changed files with 1275 additions and 15 deletions

View file

@ -3,15 +3,23 @@ import { useSectionManifest } from "../lib/sections.tsx";
import OrgListMap, { OrgMapToggle } from "./sections/OrgList-Map.tsx";
import OrgListVertical from "./sections/OrgList-Vertical.tsx";
import OrgListCards from "./sections/OrgList-Card.tsx";
import CommunityBlog from "./sections/CommunityBlog.tsx";
import { useCommunityBlog } from "../lib/useBlog.ts";
/* ═══════════════════════════════════════════════════════════════
COMMUNITY PAGE
Two views of the organizations table. The map is filtered to
chapters; the vertical list is filtered to regions. Same rows,
same endpoint, different shape on the page.
The blog first, then two views of the organizations table. The
map is filtered to chapters; the vertical list is filtered to
regions. Same rows, same endpoint, different shape on the page.
The blog's heading and blurb are the admin's (Blog → Community
section), so that one entry is built here from the same cached
request CommunityBlog makes for its posts.
═══════════════════════════════════════════════════════════════ */
const BLOG_DEFAULT_TITLE = "Community Blog";
const SECTIONS = [
{
id: "chapters",
@ -58,7 +66,19 @@ const SECTIONS = [
];
export default function CommunityPage() {
const sections = useSectionManifest(SECTIONS);
const { data: blog } = useCommunityBlog();
const sections = useSectionManifest([
{
id: "blog",
title: blog?.title || BLOG_DEFAULT_TITLE,
blurb: blog?.blurb ?? undefined,
accent: "#138ba0",
background: "#ffffff",
Component: CommunityBlog,
},
...SECTIONS,
]);
return (
<PageShell