diff --git a/hugo/data/.gitignore b/hugo/data/.gitignore index 7fa0752e6..72ab49342 100644 --- a/hugo/data/.gitignore +++ b/hugo/data/.gitignore @@ -1,3 +1,3 @@ browse.json author_index.json -channels-stats.json +channels_stats.json diff --git a/scripts/fetch-channels-stats.ts b/scripts/fetch-channels-stats.ts index f9d9d3d2d..1cbebc53a 100644 --- a/scripts/fetch-channels-stats.ts +++ b/scripts/fetch-channels-stats.ts @@ -2,7 +2,10 @@ import { mkdirSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; const CAP_BASE = process.env.CAP_BASE_URL || 'http://localhost:4004'; -const OUT_PATH = join('hugo', 'data', 'channels-stats.json'); +// Underscore filename: Hugo exposes data files under their literal basename +// (no hyphen→underscore conversion), and the health layout reads +// `.Site.Data.channels_stats`. Matches sibling convention (channel_collections.json). +const OUT_PATH = join('hugo', 'data', 'channels_stats.json'); let payload: { total: number; publishedCount: number;