Skip to content

Commit 8c45261

Browse files
committed
feat: support for post collections
1 parent a61d4c6 commit 8c45261

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/content.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,19 @@ const talkCollection = defineCollection({
4141
}),
4242
});
4343

44+
const postCollection = defineCollection({
45+
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/content/posts' }),
46+
schema: ({ image }) => z.object({
47+
title: z.string(),
48+
date: z.date(),
49+
image: image(),
50+
}),
51+
});
52+
4453
export const collections = {
4554
pages: pageCollection,
4655
links: linkCollection,
4756
jobs: jobCollection,
4857
talks: talkCollection,
58+
posts: postCollection,
4959
};

0 commit comments

Comments
 (0)