Concrete strategy for the target article category
Connected MCP client or null
Target language codes
Dry-run, skip-existing and directory flags
Mutable stats object to increment counters on
Dedup suffix including leading hyphen (e.g. "-2") or empty string; applied per-strategy to slugs
OptionalanalysisDir: stringOptional resolved analysis directory basename (e.g. "breaking-2") for transparency links
OptionalanalysisFiles: readonly AnalysisFileEntry[]Optional manifest-derived analysis file entries for dynamic transparency links
Generation result with success flag, file count and slug
Run the complete fetch → build → write cycle for one article type.
Iterates over
languages, calls the strategy for content and metadata, generates the full HTML wrapper and writes each file through the output stage. Catches all errors so the caller can continue with other types.Deduplication operates at the slug level:
dedupSuffix(e.g."-2") is appended tostrategy.typeto produce unique filenames and URLs, whileanalysisDiris passed through to the template for transparency links.