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

@ -18,6 +18,7 @@
teams published, and so is the organization
awards published
people published
blog_posts published
and each leaves out unlisted records (is_listed = 0): the QR page
is public, and listing them here would undo the point of them.
@ -70,6 +71,12 @@ directory.get("/directory", (c) => {
WHERE is_published = 1 AND is_listed = 1
ORDER BY COALESCE(sort_name, display_name)`,
),
blog_posts: all(
`SELECT id, title AS name
FROM blog_posts
WHERE is_published = 1 AND is_listed = 1
ORDER BY published_on IS NULL, published_on DESC, title`,
),
},
},
200,