mirror of
https://github.com/Xevion/undefined.behavio.rs.git
synced 2025-12-17 04:13:52 -06:00
Add draft tag, default false, provide filtering on all routes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { getCollection } from "astro:content";
|
||||
import General from "@layouts/General.astro";
|
||||
import Summary from "@components/Summary.astro";
|
||||
const posts = await getCollection("blog");
|
||||
const posts = (await getCollection("blog")).filter(entry => !entry.data.draft);
|
||||
posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime());
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user