feat: extracts some repeated logic out into lib/ files
This commit is contained in:
parent
38653f2aa1
commit
99c1539aad
22 changed files with 200 additions and 336 deletions
|
|
@ -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'))
|
||||
: [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue