import fs from 'node:fs/promises'; import path from 'node:path'; async function main() { let count = 0; for (const file of await fs.readdir('_site', { recursive: true })) { const absolute = path.join('_site', file); const stat = await fs.stat(absolute); if (stat.isDirectory()) continue; console.log(file); count += 1; } console.log(`total: ${count}`); } main();