EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...
    • Build a per-article extendedDescription (used for og:description, Twitter cards, and AI-overview surfaces) that is always ≥ DESCRIPTION_MAX_LENGTH characters whenever the editorial source paragraph is too short to satisfy truncateExtendedDescription on its own.

      This is the only code path that surfaces the localized labels.reader framing — the short <meta description> no longer carries it (see comment in composeContextualDescription). The structure is: <base> <Date: YYYY-MM-DD.> <Context: …> <reader>, passed through truncateExtendedDescription (300-char max with a 200-char min) so it occupies the Open Graph / Discover budget without exceeding it.

      Parameters

      • lang: LanguageCode

        Target language code

      • baseDescription: string

        Best description from manifest/editorial/template

      • editorial: { headline: string; summary: string }

        Artifact-derived headline and summary

        • Readonlyheadline: string

          Artifact-derived headline

        • Readonlysummary: string

          Artifact-derived summary

      • date: string

        ISO article date

      Returns string

      Extended description ≥180 chars when feasible, otherwise ''