feat: extracts some repeated logic out into lib/ files

This commit is contained in:
Lewis Wynne 2026-01-31 22:10:03 +00:00
parent 38653f2aa1
commit 99c1539aad
22 changed files with 200 additions and 336 deletions

View file

@ -11,7 +11,7 @@ function countWords(text) {
}
// Count blog posts and their words
const postsDir = path.join(root, 'src/content/posts');
const postsDir = path.join(root, 'src/content/md');
const posts = fs.existsSync(postsDir)
? fs.readdirSync(postsDir).filter(f => f.endsWith('.md'))
: [];