Generates index.html files for each language listing all news
articles. English is the primary homepage (index.html); other languages use
index-{lang}.html. Design follows riksdagsmonitor patterns: compact language
switcher, Hack23 AB footer.
Refactor 8/8 split the original 959-LOC monolith into three modules:
./news-indexes/per-language.js — pure HTML composer
(generateIndexHTML, getIndexFilename) — no file I/O.
All previously-public exports are re-exported here so existing callers and
the regression test suites in test/unit/news-indexes-*.test.js keep
working unchanged.
Description
Generates index.html files for each language listing all news articles. English is the primary homepage (index.html); other languages use index-{lang}.html. Design follows riksdagsmonitor patterns: compact language switcher, Hack23 AB footer.
Refactor 8/8 split the original 959-LOC monolith into three modules:
generateIndexHTML,getIndexFilename) — no file I/O.backfillLegacyArticleSeo,healJsonLdDescriptionCorruption,backfillArticleHreflang,applyArticleSeoBackfill,buildLegacyBackfillDescription).main()orchestration: discovery, metadata-map construction, database write, per-language atomic write.All previously-public exports are re-exported here so existing callers and the regression test suites in
test/unit/news-indexes-*.test.jskeep working unchanged.