added front page filter
a5ea2b2d
1 file(s) · +2 −1
| 8 | 8 | ||
| 9 | 9 | const MAX_POSTS = 10; |
|
| 10 | 10 | const allPosts = await getCollection("post"); |
|
| 11 | - | const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS); |
|
| 11 | + | const visiblePosts = allPosts.filter((post) => !post.data.hidden); |
|
| 12 | + | const allPostsByDate = sortMDByDate(visiblePosts).slice(0, MAX_POSTS); |
|
| 12 | 13 | --- |
|
| 13 | 14 | ||
| 14 | 15 | <PageLayout meta={{ title: "Home" }}> |