--- import { getCollection } from "astro:content"; import PageLayout from "@/layouts/PageLayout.astro"; import TopLayout from "@/layouts/TopLayout.astro"; import BottomLayout from "@/layouts/BottomLayout.astro"; import { BLOG } from "@/consts"; import Blog from "@/components/Blog"; const posts = (await getCollection("blog")) .filter((post) => !post.data.draft) .sort((a, b) => b.data.date.getTime() - a.data.date.getTime()); const tags = [...new Set(posts.flatMap((post) => post.data.tags))].sort( (a, b) => a.localeCompare(b), ); ---
{BLOG.TITLE}