fix: correct category filtering logic in getStaticPaths

This commit is contained in:
Thuan Bui
2026-03-14 16:07:34 +07:00
parent 6342b8a3aa
commit 52d1186e8f
+3 -1
View File
@@ -18,7 +18,9 @@ export async function getStaticPaths() {
params: { category: category as string }, params: { category: category as string },
props: { props: {
category, category,
posts: posts.filter((post) => post.data.categories === category), posts: posts.filter((post) =>
post.data.categories?.includes(category as string),
),
}, },
}; };
}); });