There was an error while loading. Please reload this page.
1 parent faa5cbe commit 7c1dbd7Copy full SHA for 7c1dbd7
1 file changed
src/pages/blog/tags/index.astro
@@ -4,7 +4,9 @@ import TitleCard from "@/components/ui/TitleCard.astro";
4
import Layout from "@/layouts/Layout.astro";
5
import { getCollection } from "astro:content";
6
7
-const allPosts = await getCollection("blog");
+const allPosts = (await getCollection("blog")).sort((a, b) =>
8
+ a.id.localeCompare(b.id),
9
+);
10
const tags = [...new Set(allPosts.flatMap((post) => post.data.tags))].filter(
11
(tag) => tag !== undefined,
12
);
0 commit comments