Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | 1x 1x 1x 1x 1x 11x 11x 7x 7x 7x 6x 6x 1x 10x 6x 1x 6x 6x 6x 2x 7x 7x 3x 5x 5x 2x 14x 14x 13x 13x 12x 12x 12x 5x 5x 3x 9x 9x 3x 3x 2x 7x 7x 2x 5x 5x 2x 3x 1x 1x 10x 10x 10x 6x 6x 6x 6x 10x 1x 1x 1x 1x 10x 1x 1x 10x 4x 4x 4x 4x 4x 4x 4x 2x 3x 3x 2x 2x 2x 3x 3x 3x 3x 3x 2x 2x 1x 1x 3x 4x 3x 3x 1x 2x 2x 1x 1x 1x 1x 1x | #!/usr/bin/env -S npx tsx
/**
* Fix Analysis References: Inject missing "π Analysis & Sources" section
*
* This script ensures ALL news articles contain the analysis-references section
* linking to the analysis files that were created in the same workflow run.
* It scans the analysis/ directory to discover exactly which files exist,
* then injects properly localized links into any article missing the section.
*
* **Idempotent** β safe to run multiple times. Skips articles that already
* have `class="analysis-references"`.
*
* Usage:
* npx tsx scripts/fix-analysis-references.ts
* npx tsx scripts/fix-analysis-references.ts --dry-run
* npx tsx scripts/fix-analysis-references.ts --date 2026-04-10
* npx tsx scripts/fix-analysis-references.ts --date 2026-04-10 --type committee-reports
*
* @author Hack23 AB
* @license Apache-2.0
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import type { Language } from './types/language.js';
import { ALL_LANG_CODES } from './article-template/constants.js';
import {
generateAnalysisReferencesHtml,
AGGREGATION_ARTICLE_TYPES,
} from './analysis-references.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const ROOT = path.resolve(__dirname, '..');
const NEWS_DIR = path.join(ROOT, 'news');
// ---------------------------------------------------------------------------
// Filename slug β article type mapping
// ---------------------------------------------------------------------------
/**
* Maps filename slugs (as they appear in article filenames) to the canonical
* article type keys used by ARTICLE_TYPE_TO_ANALYSIS_SUBFOLDER.
*
* Filenames like `2026-04-10-government-propositions-en.html` use
* `government-propositions` as the slug, but the analysis subfolder key is
* `propositions`.
*/
const FILENAME_SLUG_TO_ARTICLE_TYPE: Record<string, string> = {
'committee-reports': 'committee-reports',
'government-propositions': 'propositions',
'opposition-motions': 'motions',
'interpellation-debates': 'interpellations',
'evening-analysis': 'evening-analysis',
'week-ahead': 'week-ahead',
'month-ahead': 'month-ahead',
'weekly-review': 'weekly-review',
'monthly-review': 'monthly-review',
'deep-inspection': 'deep-inspection',
};
// ---------------------------------------------------------------------------
// Parsing
// ---------------------------------------------------------------------------
interface ArticleInfo {
date: string;
slug: string;
articleType: string;
lang: Language;
filepath: string;
}
/**
* Parse an article filename into its components.
* Returns null for files that don't match the expected pattern.
*/
function parseArticleFilename(filename: string): ArticleInfo | null {
// Pattern: YYYY-MM-DD-{slug}-{lang}.html
const match = filename.match(/^(\d{4}-\d{2}-\d{2})-(.+)-([a-z]{2})\.html$/);
if (!match) return null;
const [, date, slug, langStr] = match;
const lang = langStr as Language;
if (!ALL_LANG_CODES.includes(lang)) return null;
// Try direct slug match first
let articleType = FILENAME_SLUG_TO_ARTICLE_TYPE[slug];
// If no direct match, try prefix matching for breaking news and other dynamic slugs
if (!articleType) {
for (const [prefix, type] of Object.entries(FILENAME_SLUG_TO_ARTICLE_TYPE)) {
Iif (slug.startsWith(prefix)) {
articleType = type;
break;
}
}
}
// Breaking news: slug starts with "breaking-"
if (!articleType && slug.startsWith('breaking-')) {
articleType = 'breaking';
}
// Realtime monitor articles have timestamps
Iif (!articleType && slug.startsWith('realtime-')) {
articleType = 'realtime';
}
Iif (!articleType) return null;
return {
date,
slug,
articleType,
lang,
filepath: path.join(NEWS_DIR, filename),
};
}
// ---------------------------------------------------------------------------
// Injection logic
// ---------------------------------------------------------------------------
/**
* Check if an article already has an analysis-references section.
*/
function hasAnalysisReferences(html: string): boolean {
return html.includes('class="analysis-references"');
}
/**
* Helper: check if a path (resolved against ROOT) is an existing file.
*/
function isFileAtRoot(relativePath: string): boolean {
try {
return fs.statSync(path.resolve(ROOT, relativePath)).isFile();
} catch {
return false;
}
}
/**
* Helper: check if a path (resolved against ROOT) is an existing directory.
*/
function isDirectoryAtRoot(relativePath: string): boolean {
try {
return fs.statSync(path.resolve(ROOT, relativePath)).isDirectory();
} catch {
return false;
}
}
/**
* Check if an existing analysis-references section has broken links.
* Extracts analysis file paths from href attributes and verifies they exist
* on the local filesystem (resolved against the repository ROOT).
* Uses statSync().isFile() for blob links and statSync().isDirectory() for
* tree links to match the -f / -d semantics in validate-news-generation.sh.
* Returns true if ANY analysis file link is broken.
*/
function hasBrokenAnalysisLinks(html: string): boolean {
// Extract all analysis/daily/... paths from href attributes within the analysis-references section
const sectionStart = html.indexOf('class="analysis-references"');
if (sectionStart === -1) return false;
const sectionEnd = html.indexOf('</section>', sectionStart);
if (sectionEnd === -1) return false;
const section = html.slice(sectionStart, sectionEnd);
// Match GitHub blob URL paths: href="https://github.com/Hack23/riksdagsmonitor/blob/main/analysis/daily/..."
const githubBlobRegex = /href="https:\/\/github\.com\/Hack23\/riksdagsmonitor\/blob\/main\/(analysis\/daily\/[^"]+\.md)"/g;
let match: RegExpExecArray | null;
while ((match = githubBlobRegex.exec(section)) !== null) {
const filePath = match[1];
if (!isFileAtRoot(filePath)) {
return true; // At least one blob link target is not a file
}
}
// Match GitHub tree URL paths: href="https://github.com/Hack23/riksdagsmonitor/tree/main/analysis/daily/..."
const githubTreeRegex = /href="https:\/\/github\.com\/Hack23\/riksdagsmonitor\/tree\/main\/(analysis\/daily\/[^"]+)"/g;
while ((match = githubTreeRegex.exec(section)) !== null) {
const dirPath = match[1].replace(/\/$/, ''); // Remove trailing slash
if (!isDirectoryAtRoot(dirPath)) {
return true; // At least one tree link target is not a directory
}
}
// Match relative paths: href="../analysis/..." or href="analysis/..." (any
// depth and any subdirectory under analysis/, including methodologies/).
// Relative hrefs to analysis files are ALWAYS treated as broken format,
// even when the target exists on disk, because these articles are served
// from GitHub Pages / riksdagsmonitor.com where relative `.md` paths
// resolve to raw-markdown URLs that do not render. The canonical form is
// `https://github.com/Hack23/riksdagsmonitor/blob/main/analysis/...` (see
// .github/aw/SHARED_PROMPT_PATTERNS.md Β§ANALYSIS FILE GITHUB REFERENCES
// and the exemplar news/2026-04-18-weekly-review-en.html).
const relativeAnalysisRegex = /href="(?:\.\.?\/)+analysis\/[^"]+"/;
if (relativeAnalysisRegex.test(section)) {
return true;
}
const bareRelativeAnalysisRegex = /href="analysis\/[^"]+"/;
if (bareRelativeAnalysisRegex.test(section)) {
return true;
}
// If the section exists but has no analysis links at all, it's likely a placeholder
// Don't treat it as broken β it may be a legitimately empty section
return false;
}
/** GitHub blob base URL for canonical analysis file links. */
const GITHUB_BLOB_BASE = 'https://github.com/Hack23/riksdagsmonitor/blob/main';
/** GitHub tree base URL for canonical analysis directory links. */
const GITHUB_TREE_BASE = 'https://github.com/Hack23/riksdagsmonitor/tree/main';
/**
* Rewrite relative `href="(β¦/)?analysis/β¦"` attributes to canonical GitHub
* blob/tree URLs across the ENTIRE HTML document, preserving all surrounding
* markup (headings, labels, emoji, descriptions, prose). This is the preferred,
* minimally-destructive fix when the only issue is URL format β it keeps
* hand-curated labels and in-line commentary intact.
*
* Returns `{ html, changed }` where `changed` is true if at least one href was
* rewritten. When `changed` is false, returns the input unmodified.
*
* Transforms applied:
* - `href="../analysis/β¦/foo.md"` β `href="${GITHUB_BLOB_BASE}/analysis/β¦/foo.md"`
* - `href="../../analysis/β¦/foo.md"` β `href="${GITHUB_BLOB_BASE}/analysis/β¦/foo.md"`
* - `href="analysis/daily/β¦/foo.md"` β `href="${GITHUB_BLOB_BASE}/analysis/daily/β¦/foo.md"`
* - `href="../analysis/β¦/subdir/"` β `href="${GITHUB_TREE_BASE}/analysis/β¦/subdir/"`
* - `href="https://β¦/tree/main/<path>.md"` β `href="${GITHUB_BLOB_BASE}/<path>.md"` (tree β blob
* correction: GitHub's `tree/` URLs 404 for files β only directories render)
*
* Applies to both the `<section class="analysis-references">` section AND any
* prose-embedded analysis links elsewhere in the article body.
*/
function rewriteRelativeAnalysisLinksInSection(
html: string,
): { html: string; changed: boolean } {
let out = html;
let changed = false;
// Rewrite relative hrefs (../ or ../../ prefixes) pointing to analysis/β¦
out = out.replace(
/href="(?:\.\.?\/)+analysis\/([^"]+)"/g,
(_m, rest: string) => {
changed = true;
// Heuristic: paths ending in a file extension (`.md`, `.json`, β¦) are
// blob links; trailing slash or no extension means a directory (tree).
const isDir = rest.endsWith('/') || !/\.[a-z0-9]+$/i.test(rest);
const base = isDir ? GITHUB_TREE_BASE : GITHUB_BLOB_BASE;
return `href="${base}/analysis/${rest}"`;
},
);
// Rewrite bare relative hrefs (no ./ or ../ prefix) pointing to analysis/β¦
out = out.replace(
/href="analysis\/([^"]+)"/g,
(_m, rest: string) => {
changed = true;
const isDir = rest.endsWith('/') || !/\.[a-z0-9]+$/i.test(rest);
const base = isDir ? GITHUB_TREE_BASE : GITHUB_BLOB_BASE;
return `href="${base}/analysis/${rest}"`;
},
);
// Correct mis-typed `tree/main/<path>.md` β `blob/main/<path>.md`. GitHub's
// `tree/` URLs 404 for files (only directories render); all `.md`/file links
// must use the `blob/main/` prefix. Observed in articles prior to this fix
// (e.g. news/2026-04-16-breaking-1244-*.html).
out = out.replace(
/href="https:\/\/github\.com\/Hack23\/riksdagsmonitor\/tree\/main\/(analysis\/[^"]+\.[a-z0-9]+)"/gi,
(_m, rest: string) => {
changed = true;
return `href="${GITHUB_BLOB_BASE}/${rest}"`;
},
);
return { html: out, changed };
}
/**
* Check whether every analysis file/dir still referenced by (non-relative)
* canonical GitHub URLs inside the analysis-references section resolves to a
* real file/directory on disk. Used after {@link rewriteRelativeAnalysisLinksInSection}
* to decide whether the in-place rewrite is sufficient or a full regeneration
* is required.
*/
function allCanonicalLinksResolve(html: string): boolean {
const sectionStart = html.indexOf('class="analysis-references"');
Iif (sectionStart === -1) return true;
const sectionEnd = html.indexOf('</section>', sectionStart);
Iif (sectionEnd === -1) return true;
const section = html.slice(sectionStart, sectionEnd);
const blobRegex = /href="https:\/\/github\.com\/Hack23\/riksdagsmonitor\/blob\/main\/(analysis\/[^"]+\.[a-z0-9]+)"/gi;
let m: RegExpExecArray | null;
while ((m = blobRegex.exec(section)) !== null) {
if (!isFileAtRoot(m[1])) return false;
}
const treeRegex = /href="https:\/\/github\.com\/Hack23\/riksdagsmonitor\/tree\/main\/(analysis\/[^"]+)"/gi;
while ((m = treeRegex.exec(section)) !== null) {
const dirPath = m[1].replace(/\/$/, '');
if (!isDirectoryAtRoot(dirPath)) return false;
}
return true;
}
/**
* Check if an aggregation-type article has cross-reference links.
* Returns true if the article has the "Cross-Referenced Analysis" subsection.
*/
function hasCrossReferences(html: string): boolean {
return html.includes('Cross-Referenced Analysis') || html.includes('Korsrefererad analys');
}
/**
* Remove the existing analysis-references section from HTML.
* Returns the HTML without the section, or the original if not found.
*/
function removeAnalysisReferences(html: string): string {
const startTag = '<section class="analysis-references"';
const endTag = '</section>';
const startIdx = html.indexOf(startTag);
if (startIdx === -1) return html;
const endIdx = html.indexOf(endTag, startIdx);
if (endIdx === -1) return html;
// Remove from start of section to end of </section> plus trailing newline
const afterEnd = endIdx + endTag.length;
const trailing = html[afterEnd] === '\n' ? afterEnd + 1 : afterEnd;
return html.slice(0, startIdx) + html.slice(trailing);
}
/**
* Inject the analysis-references HTML section into an article.
* Inserts before </body>, or before <footer if </body> not found.
* Returns the modified HTML, or null if no injection point was found.
*/
function injectAnalysisReferences(html: string, referencesHtml: string): string | null {
if (!referencesHtml) return null;
// Try insertion points in priority order:
// 1. Before <footer class="article-footer"> (standard template pattern)
const footerMatch = html.match(/<footer\s+class="article-footer"/);
if (footerMatch && footerMatch.index !== undefined) {
return (
html.slice(0, footerMatch.index) +
referencesHtml +
'\n ' +
html.slice(footerMatch.index)
);
}
// 2. Before any <footer> tag
const anyFooterIdx = html.indexOf('<footer');
if (anyFooterIdx !== -1) {
return (
html.slice(0, anyFooterIdx) +
referencesHtml +
'\n ' +
html.slice(anyFooterIdx)
);
}
// 3. Before </body>
const bodyCloseIdx = html.indexOf('</body>');
Eif (bodyCloseIdx !== -1) {
return (
html.slice(0, bodyCloseIdx) +
referencesHtml +
'\n' +
html.slice(bodyCloseIdx)
);
}
// 4. Append before end of file as last resort
return html + '\n' + referencesHtml + '\n';
}
// ---------------------------------------------------------------------------
// Main
// ---------------------------------------------------------------------------
function main(): void {
const args = process.argv.slice(2);
const dryRun = args.includes('--dry-run');
const upgrade = args.includes('--upgrade');
const rewrite = args.includes('--rewrite');
const dateIdx = args.indexOf('--date');
const filterDate = dateIdx !== -1 ? args[dateIdx + 1] : undefined;
const typeIdx = args.indexOf('--type');
const filterType = typeIdx !== -1 ? args[typeIdx + 1] : undefined;
console.log('π Fix Analysis References β Ensuring all articles link to their analysis files');
if (dryRun) console.log(' (dry run β no files will be modified)\n');
if (upgrade) console.log(' (upgrade mode β will replace existing sections for aggregation types missing cross-references)\n');
if (rewrite) console.log(' (rewrite mode β will replace existing sections that have broken links to non-existent analysis files)\n');
if (filterDate) console.log(` Filtering to date: ${filterDate}`);
if (filterType) console.log(` Filtering to type: ${filterType}`);
console.log('');
if (!fs.existsSync(NEWS_DIR)) {
console.log('No news/ directory found. Nothing to do.');
return;
}
const files = fs.readdirSync(NEWS_DIR).filter(f => f.endsWith('.html') && !f.startsWith('index'));
console.log(`Found ${files.length} article files in news/\n`);
let checked = 0;
let alreadyHas = 0;
let injected = 0;
let upgraded = 0;
let rewritten = 0;
let brokenDetected = 0;
let noAnalysis = 0;
let skipped = 0;
for (const filename of files.sort()) {
const info = parseArticleFilename(filename);
if (!info) {
skipped++;
continue;
}
// Apply filters
if (filterDate && info.date !== filterDate) continue;
if (filterType && info.articleType !== filterType && info.slug !== filterType) continue;
checked++;
let html = fs.readFileSync(info.filepath, 'utf-8');
// Universal pass (only under --rewrite): rewrite relative analysis hrefs
// (and treeβblob mistakes for file URLs) anywhere in the article. This
// fixes prose-embedded links even when the analysis-references section
// itself has valid URLs. Only writes the file if something actually
// changed.
if (rewrite) {
const universal = rewriteRelativeAnalysisLinksInSection(html);
if (universal.changed) {
html = universal.html;
if (!dryRun) {
fs.writeFileSync(info.filepath, html, 'utf-8');
}
console.log(` π§Ή ${dryRun ? 'Would normalize' : 'Normalized'} relative analysis hrefs: ${filename}`);
}
}
const alreadyExists = hasAnalysisReferences(html);
// --rewrite mode: detect and replace sections with broken links
if (alreadyExists && rewrite) {
const broken = hasBrokenAnalysisLinks(html);
if (broken) {
brokenDetected++;
// Preferred path: minimally-destructive in-place URL rewrite.
// Converts relative `href="../analysis/β¦"` to canonical GitHub URLs
// while preserving hand-curated labels, emoji, and descriptions.
// Only accept this path if ALL resulting canonical URLs point to
// real files/directories on disk β otherwise fall back to full
// regeneration below.
const inPlace = rewriteRelativeAnalysisLinksInSection(html);
if (inPlace.changed && allCanonicalLinksResolve(inPlace.html)) {
if (!dryRun) {
fs.writeFileSync(info.filepath, inPlace.html, 'utf-8');
}
rewritten++;
console.log(` π§ ${dryRun ? 'Would rewrite (in-place URL fix)' : 'Rewrote (in-place URL fix)'}: ${filename}`);
continue;
}
// Fallback: remove broken section and regenerate from filesystem scan
html = removeAnalysisReferences(html);
const referencesHtml = generateAnalysisReferencesHtml({
date: info.date,
articleType: info.articleType,
lang: info.lang,
});
if (referencesHtml) {
const modified = injectAnalysisReferences(html, referencesHtml);
if (modified) {
if (!dryRun) {
fs.writeFileSync(info.filepath, modified, 'utf-8');
}
rewritten++;
console.log(` π§ ${dryRun ? 'Would rewrite' : 'Rewrote'} broken analysis references (full regenerate): ${filename}`);
continue;
}
}
// If no analysis files exist to link to, remove the broken section entirely
if (!dryRun) {
fs.writeFileSync(info.filepath, html, 'utf-8');
}
console.log(` β οΈ Removed broken analysis-references (no analysis files found): ${filename}`);
continue;
}
}
// Check if this aggregation-type article needs cross-reference upgrade
if (alreadyExists && upgrade && AGGREGATION_ARTICLE_TYPES.has(info.articleType) && !hasCrossReferences(html)) {
// Remove old section and re-inject with cross-references
html = removeAnalysisReferences(html);
const referencesHtml = generateAnalysisReferencesHtml({
date: info.date,
articleType: info.articleType,
lang: info.lang,
});
if (referencesHtml) {
const modified = injectAnalysisReferences(html, referencesHtml);
if (modified) {
if (!dryRun) {
fs.writeFileSync(info.filepath, modified, 'utf-8');
}
upgraded++;
console.log(` π ${dryRun ? 'Would upgrade' : 'Upgraded'} with cross-references: ${filename}`);
continue;
}
}
}
if (alreadyExists) {
alreadyHas++;
continue;
}
// Generate analysis references for this article
const referencesHtml = generateAnalysisReferencesHtml({
date: info.date,
articleType: info.articleType,
lang: info.lang,
});
if (!referencesHtml) {
noAnalysis++;
console.log(` β οΈ No analysis files found for: ${filename} (type=${info.articleType}, date=${info.date})`);
continue;
}
const modified = injectAnalysisReferences(html, referencesHtml);
if (!modified) {
console.log(` β Could not find injection point in: ${filename}`);
continue;
}
if (!dryRun) {
fs.writeFileSync(info.filepath, modified, 'utf-8');
}
injected++;
console.log(` β
${dryRun ? 'Would inject' : 'Injected'} analysis references into: ${filename}`);
}
console.log('\n=== Summary ===');
console.log(`Articles checked: ${checked}`);
console.log(`Already have analysis references: ${alreadyHas}`);
console.log(`Injected analysis references: ${injected}`);
console.log(`Upgraded with cross-references: ${upgraded}`);
console.log(`Broken links detected: ${brokenDetected}`);
console.log(`Rewritten (broken β fixed): ${rewritten}`);
console.log(`No analysis files available: ${noAnalysis}`);
console.log(`Skipped (unrecognized pattern): ${skipped}`);
if (dryRun) console.log('\n(Dry run β no files were modified)');
console.log('\nβ Done!');
}
import { pathToFileURL } from 'url';
Iif (import.meta.url === pathToFileURL(process.argv[1]).href) {
main();
}
// ---------------------------------------------------------------------------
// Exports for testing
// ---------------------------------------------------------------------------
export {
parseArticleFilename,
hasAnalysisReferences,
hasBrokenAnalysisLinks,
hasCrossReferences,
removeAnalysisReferences,
injectAnalysisReferences,
rewriteRelativeAnalysisLinksInSection,
allCanonicalLinksResolve,
FILENAME_SLUG_TO_ARTICLE_TYPE,
};
export type { ArticleInfo };
|