v5.2.17
Add an opt-in flow where the newsletter generator expands its lead section into a full blog article and links to it from the issue.
When marketing.beehiiv.content.article.enabled is true, the generator runs the Ghostii engine on structure.sections[0] (the lead story) — concurrently with SVG image generation — to write a full article + hero image. It derives the public URL from the title slug ({brand.url}/blog/{slug}) and injects section.cta = { label: 'Read the full article', url } onto the lead section. The MJML sectionCard already renders section.cta; the markdown renderer now does too.
Generate/publish split via opts.publishArticle: the article is always generated when enabled, but only committed to the website repo via admin/post when publishArticle is true. The production cron passes true; the iteration test leaves it false (opt in with NEWSLETTER_CREATE_ARTICLE=1). Failure-isolated — if the article build throws, no CTA is injected and the newsletter ships normally.
Extracted the Ghostii API + publish helpers into a shared SSOT module (libraries/content/ghostii.js) used by both this flow and the standalone ghostii-auto-publisher.js cron (now disabled by default, articles: 0). The newsletter iteration test now defaults to no-claim (opt into consuming sources with NEWSLETTER_CLAIM=1) and saves the generated article to the run dir as article.json + article.md.