Skip to content

Commit

Permalink
fixing static collection error
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelernestog committed Oct 27, 2024
1 parent ce3f304 commit 5347f42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/categorias/[category]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function getStaticPaths({ paginate }) {
}
const allPosts = await getCollection("blog");
return allCategories.map((categoryObj) => {
return allCategories.flatMap((categoryObj) => {
let filteredPosts =
categoryObj.key == "todo" ? allPosts : allPosts.filter((post) => post.data.categories.includes(categoryObj.key));
filteredPosts.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
Expand Down

0 comments on commit 5347f42

Please sign in to comment.