From 52d1186e8fc2f52da54b0ceb9478cb434c57eedf Mon Sep 17 00:00:00 2001 From: Thuan Bui <9248622+10h30@users.noreply.github.com> Date: Sat, 14 Mar 2026 16:07:34 +0700 Subject: [PATCH] fix: correct category filtering logic in getStaticPaths --- src/pages/category/[category].astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/category/[category].astro b/src/pages/category/[category].astro index 4d8b8e6..3a8adcd 100644 --- a/src/pages/category/[category].astro +++ b/src/pages/category/[category].astro @@ -18,7 +18,9 @@ export async function getStaticPaths() { params: { category: category as string }, props: { category, - posts: posts.filter((post) => post.data.categories === category), + posts: posts.filter((post) => + post.data.categories?.includes(category as string), + ), }, }; });