EU Parliament Monitor — API Documentation - v0.8.49
    Preparing search index...

    Module Aggregator/ArticleHtml

    Wrap a rendered article body in the same site chrome that political-intelligence.html uses — site header, language switcher, skip link, theme toggle, breadcrumb, and footer. All chrome is reused from existing modules (constants/config.ts, constants/languages.ts, templates/section-builders.ts) so localisation, a11y, and CSP stay consistent with the rest of the site.

    The output is a complete HTML5 document. No inline <script> is emitted in the body. Mermaid is loaded from the same-origin vendored ESM bundle (copied to js/vendor/mermaid/ by scripts/copy-vendor.js) via <script type="module" src="../js/mermaid-init.js?v=<MERMAID_VERSION>" defer> so CSP stays script-src 'self'. The ?v= query parameter is sourced from devDependencies.mermaid in package.json (a fixed pin like 11.14.0); regenerating articles after a Mermaid bump invalidates browser and CloudFront caches automatically.

    Functions

    getArticleFilename
    buildArticleToc
    wrapArticleHtml

    Interfaces

    ArticleTocEntry
    WrapArticleOptions