add syndication text field with 240-char limit
Created by: jedmund
Summary
- Added a
syndicationTextfield to posts so you can write a custom message for Bluesky/Mastodon instead of relying on auto-generated text - Rewrote syndication formatting to use a single 240-character limit across all platforms and content types
- Added
excerptcolumn to the Post model for essay summaries
What changed
Database — new excerpt and syndicationText columns on the Post model
Admin UI — syndication message textarea in post metadata (both full form and popover), with char count and 240 max
Syndication logic — simplified the formatting priority:
- Custom
syndicationTextif set -
excerpt(for essays/posts that have one) - Auto-generated from content (truncated to 240 chars)
Removed the old per-platform, per-content-type excerpt limits in favor of one consistent 240-char cap with a shared truncateText helper.
API routes — create/update/patch endpoints now accept and persist both new fields
Test plan
-
Create a post with a custom syndication message → publishes with that text on Bluesky/Mastodon -
Create a post without syndication message → falls back to excerpt or content -
Essay with excerpt → syndication uses title + excerpt, truncated to 240 chars -
Char counter in the textarea shows correct count and enforces 240 limit -
Edit an existing post → syndicationText loads and saves correctly