troylusty.com/src/pages/posts/index.astro

12 lines
346 B
Text
Raw Normal View History

2024-12-23 21:18:55 +00:00
---
import { getCollection } from "astro:content";
import { POSTS } from "@consts";
import ShowcasePage from "@components/ShowcasePage.astro";
const posts = (await getCollection("posts"))
.filter((post) => !post.data.draft)
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
---
<ShowcasePage content={posts} CONSTS={POSTS} />