refactor: use a content collection for daily posts

This commit is contained in:
Oliver Davies 2023-04-09 11:25:12 +01:00
parent 58061a8e59
commit 9088ed2101
150 changed files with 1192 additions and 61 deletions

View file

@ -11,6 +11,15 @@ const blogCollection = defineCollection({
}),
});
const dailyEmailCollection = defineCollection({
schema: z.object({
pubDate: z.date(),
permalink: z.string(),
tags: z.array(z.string()).optional(),
title: z.string(),
}),
});
const talkCollection = defineCollection({
schema: z.object({
description: z.string(),
@ -27,6 +36,7 @@ const talkCollection = defineCollection({
});
export const collections = {
'daily-email': dailyEmailCollection,
blog: blogCollection,
talk: talkCollection,
};