add garden posts to rss feeds
Created by: jedmund
Summary
- Garden posts now show up in RSS. Published items with a
noteappear in a new/rss/gardenfeed; items also flaggedshowInUniversepromote into the main/rss"Everything" feed without creating a duplicate Post. - New Show in Universe toggle on the Garden composer (mirrors the Album pattern). Backed by a new
GardenItem.showInUniversecolumn (defaultfalse) + migration, threaded through the admin create/update endpoints. - Extracted the duplicated RSS helpers (
escapeXML,formatRFC822Date,extractTextSummary,convertContentToHTML) intosrc/lib/server/rss/helpers.tsso all three feed handlers share them. - Listed the new Garden feed on
/feeds.
Only items with real commentary (non-null note) go into either feed — bare catalog entries stay out.
Test plan
-
Run npx prisma migrate devto apply20260422120000_garden_show_in_universe -
In the admin, edit a published Garden item with a note, toggle Show in Universe on, save; edit another, leave it off -
GET /rss/garden— both items present, note rendered as HTML, imageUrl as enclosure, link to/garden/{category}/{slug}, categories include creator/rating/favorite/current -
GET /rss— only the opted-in item appears among Garden entries, interleaved with Posts/Albums by date -
GET /feeds— Garden feed listed with working Subscribe link -
Duplication check: promoted Garden item shows once (Garden entry), no shadow Post created -
Confirm /rssand/rss/photosstill byte-for-byte equivalent aside from the new Garden items (helper extraction is a mechanical move) -
Validate new feed XML at https://validator.w3.org/feed/