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

    Function generateSitemapHTML

    • Generate a sitemap HTML page for a specific language.

      Lists all articles for that language with titles and descriptions, grouped by editorial category in CATEGORY_ORDER, plus a high-level documentation section (only when hasDocsDir is true) and a Pages section with one entry per supported language.

      The output document includes:

      • <head> <link rel="alternate"> hreflang block covering every supported language plus x-default → English
      • JSON-LD CollectionPage structured data (with < escaped as \u003c to avoid breaking out of the <script> element)
      • Skip link, header brand, theme toggle, language switcher
      • Hero section with localized stats (article count, language count, category count, last-updated date)
      • Breadcrumb nav
      • Pages / Documentation / News sections
      • Shared site footer via buildSiteFooter

      Parameters

      • lang: string

        Language code

      • articleInfos: SitemapArticleInfo[]

        Article info (title/description) for this language

      • hasDocsDir: boolean = false

        Whether the docs/ directory exists (controls the Documentation section)

      Returns string

      Complete HTML document string