Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    interface ArticleHeadMetadataInput {
    ย ย ย ย markdown: string;
    ย ย ย ย lang: Language;
    ย ย ย ย canonicalPath: string;
    ย ย ย ย now?: Date;
    ย ย ย ย parsedData?: Record<string, unknown>;
    ย ย ย ย briefDerivedTitle?: string;
    ย ย ย ย briefDerivedDescription?: string;
    ย ย ย ย briefDerivedEntities?: readonly string[];
    }
    Index
    markdown: string

    Aggregated markdown (front-matter + body) produced by aggregateAnalysis.

    lang: Language

    Target language code.

    canonicalPath: string

    Canonical path (e.g. news/2026-04-23-propositions-en.html).

    now?: Date

    Optional clock seam used by parseFrontMatterDate when the front-matter date: is missing or malformed. Defaults to new Date().

    parsedData?: Record<string, unknown>

    Pre-parsed front-matter data (the .data record returned by gray-matter). When provided, the internal matter() call is skipped, avoiding a duplicate parse in callers (e.g. renderArticleHtml) that have already parsed the markdown.

    briefDerivedTitle?: string

    Brief-derived title โ€” when set (non-empty), this trumps the fm.title frontmatter line. Sourced directly from the executive brief by renderArticleHtml (see ./article.ts). Leaving this unset preserves the legacy frontmatter-only audit path so the 278 pre-2026-03-26 legacy news/*-en.html files (whose analysis/daily/<date>/ sources have been deleted) keep their existing SEO without throwing.

    briefDerivedDescription?: string

    Brief-derived description โ€” when set (non-empty), this trumps the fm.description frontmatter line. Companion to briefDerivedTitle.

    briefDerivedEntities?: readonly string[]

    Brief-derived entity tokens (bill IDs, committee codes, party codes, named entities) โ€” when provided, these seed the SERP keywords string in buildArticleSeoMetadata instead of re-parsing the (now-deprecated) fm.keywords line. The aggregator no longer writes keywords: into article.md since 2026-05-24; the renderer mines entities directly from the brief markdown.