fix: filter draft posts from homepage index
This commit is contained in:
parent
df5499cf35
commit
b62e565d38
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ interface TxtConfig {
|
||||||
pinned?: string[];
|
pinned?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const posts = await getCollection('posts');
|
const posts = await getCollection('posts', ({ data }) => data.draft !== true);
|
||||||
|
|
||||||
// Group by category (default: "posts")
|
// Group by category (default: "posts")
|
||||||
const grouped = posts.reduce((acc, post) => {
|
const grouped = posts.reduce((acc, post) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue