mirror of
https://github.com/10h30/blog-balodeplao.git
synced 2026-05-12 15:21:15 +09:00
fix: correct category filtering logic in getStaticPaths
This commit is contained in:
@@ -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),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user