feat(essay): new "Beyond the Bookshelf" series

This commit is contained in:
Stefan Imhoff
2024-12-04 16:39:27 +01:00
parent 9f81a863fe
commit a028bbf38d
21 changed files with 743 additions and 23 deletions

View File

@@ -1,5 +1,7 @@
---
// Cspell:words astro imhoff fullsize webp pagefind
import type { CollectionEntry } from 'astro:content';
type JournalType = CollectionEntry<'journal'>;
import { getCollection } from 'astro:content';
import { formatPosts, isProduction, sortMarkdownByDate } from '../utils';
@@ -28,7 +30,7 @@ import { Content as Journal } from '../text/homepage/journal.mdx';
import { mapping } from '../mdx-components';
const allPosts = await getCollection('journal');
const allPosts = await getCollection('journal', ({ data }: JournalType) => !data.draft);
const formattedLatest = formatPosts(allPosts, { limit: 6 });
const title = 'Stefan Imhoff';