feat: add archive view of posts

This commit is contained in:
Devin Haska 2024-02-07 20:02:59 -08:00
parent 5e72b839fe
commit 6265474981
8 changed files with 78 additions and 10 deletions

View file

@ -32,9 +32,9 @@ const getPostsByCategory = (collection) => {
const postsByCategory = {};
categories.forEach((category) => {
const categoryPosts = posts.filter((post) =>
post.data.categories.includes(category),
);
const categoryPosts = posts.filter((post) => {
return post.data.categories.includes(category);
});
postsByCategory[category] = categoryPosts;
});