Retroactively injects analysis transparency sections into existing
news articles that have matching analysis directories on disk but lack the
<section class="analysis-transparency"> section.
This tool scans all articles in news/, matches them against available analysis
directories under analysis/daily/{date}/{type}*, discovers all .md analysis
files on disk, and injects the rendered section before the <nav class="article-nav">
element.
Description
Retroactively injects analysis transparency sections into existing news articles that have matching analysis directories on disk but lack the
<section class="analysis-transparency">section.This tool scans all articles in
news/, matches them against available analysis directories underanalysis/daily/{date}/{type}*, discovers all.mdanalysis files on disk, and injects the rendered section before the<nav class="article-nav">element.Usage: npx tsx src/utils/retrofit-analysis-links.ts [--dry-run]