Can hide blog posts

This commit is contained in:
Joe Carstairs
2024-06-11 11:27:00 +01:00
parent fe154c01cf
commit 952c90bbbf
3 changed files with 3 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ export interface Props {
const { headingLevel = 2, hideAuthor = false } = Astro.props;
const posts = (await getCollection('blog'));
const posts = (await getCollection('blog')).filter((post) => !post.data.hidden);
const distinctYears: number[] = posts
.map(post => post.data.pubDate.year)