Derive <title> / <meta description> / keyword-entity overrides from the executive-brief markdown adjacent to article.md. Pure function โ no I/O, no clock.
Resolution order:
For non-EN, prefer RenderArticleInput.localizedBriefMarkdown via extractLocalizedBriefSeo. Title and description are resolved independently: a banned title with a clean BLUF still localizes the description, and a clean title with an empty BLUF still localizes the title.
Entities are mined from the brief (localized first, EN fallback) โ universal-Swedish identifiers (HD03267, JuU/SfU) carry across locales.
Returns { title: undefined, description: undefined, entities: [] } when no brief markdown is provided so the head-metadata helper falls back to the legacy frontmatter-only audit path (covers the 278 pre- 2026-03-26news/*-en.html files whose source analysis/daily/ directories have been deleted).
Derive
<title>/<meta description>/ keyword-entity overrides from the executive-brief markdown adjacent toarticle.md. Pure function โ no I/O, no clock.Resolution order:
nullafter step 1 falls through to the English brief โ title via readFirstHeading โ cleanArticleTitle; description via composeRichDescription โฅ readBlufParagraph โฅ readFirstParagraph, capped by per-language SERP window in truncateToSentenceBoundary.Returns
{ title: undefined, description: undefined, entities: [] }when no brief markdown is provided so the head-metadata helper falls back to the legacy frontmatter-only audit path (covers the 278 pre-2026-03-26news/*-en.htmlfiles whose sourceanalysis/daily/directories have been deleted).Exported for testability.