feat: filter draft posts from public /md/ index
This commit is contained in:
parent
f3640e6308
commit
17ece5a34b
1 changed files with 1 additions and 1 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue