feat: filter draft posts from public /md/ index

This commit is contained in:
Lewis Wynne 2026-01-29 01:31:12 +00:00
parent f3640e6308
commit 17ece5a34b

View file

@ -2,7 +2,7 @@
import { getCollection } from 'astro:content';
import Layout from '../../layouts/Layout.astro';
const posts = await getCollection('posts');
const posts = await getCollection('posts', ({ data }) => data.draft !== true);
// Group by category (default: "posts")
const grouped = posts.reduce((acc, post) => {