Skip to content

Commit 56d258c

Browse files
committed
fix: Update articles to show on Thoughts page to 5
1 parent 1f7c0cc commit 56d258c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/generateThoughts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { format as dateFormat } from 'date-fns';
55

66
import findInDir from './findInDir';
77

8+
const ARTICLES_TO_SHOW = 5;
9+
810
console.log('/// Beginning generation of thoughts');
911

1012
const templates = findInDir('./templates', '.html');
@@ -107,7 +109,7 @@ let blockToPaste = '';
107109

108110
articlesGenerated.sort((a, b) => b.dateNum - a.dateNum); // most-recent first
109111

110-
for (let i = 0; i < Math.min(2, articlesGenerated.length); i++) {
112+
for (let i = 0; i < Math.min(ARTICLES_TO_SHOW, articlesGenerated.length); i++) {
111113
blockToPaste =
112114
blockToPaste +
113115
`${repeatableBlock}`

0 commit comments

Comments
 (0)