Beehiiv archive
`sync:beehiiv` writes newsletter content to `assets/beehiiv-posts.json`, with a public-site fallback if the API path fails.
The newsletter workflow combines Beehiiv data, local static pages, Firestore source queues, OpenAI-generated drafts, and review-before-publish tooling.
`sync:beehiiv` writes newsletter content to `assets/beehiiv-posts.json`, with a public-site fallback if the API path fails.
The draft generator reads queued `newsletter_sources` documents from Firestore and stores reviewable drafts.
The Firebase function creates drafts for review; it does not publish to Beehiiv automatically.
Scripts include `sync:beehiiv`, `generate:newsletter`, and `publish:newsletter` for manual or automated newsletter operations.
`generateScheduledNewsletterDraft` uses scheduled execution, OpenAI, and Firestore collections for source and draft state.
The site keeps on-site newsletter pages while also linking to Beehiiv for the hosted publication.
Publish the first newsletter issue on-site and link it from the site.
Sync Beehiiv publication metadata into local JSON for the site.
Generate reviewable drafts from queued Firestore source documents.
Use the Beehiiv publish script only after review, keeping the workflow gated.