refactor: use a content collection for talks
This commit is contained in:
parent
85644e4f2d
commit
7b97ad3af2
42 changed files with 111 additions and 92 deletions
20
src/content/config.ts
Normal file
20
src/content/config.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { defineCollection, z } from 'astro:content';
|
||||
|
||||
const talkCollection = defineCollection({
|
||||
schema: z.object({
|
||||
description: z.string(),
|
||||
events: z.array(z.object({
|
||||
date: z.string(),
|
||||
location: z.string().optional(),
|
||||
name: z.string(),
|
||||
online: z.boolean().optional(),
|
||||
})),
|
||||
title: z.string(),
|
||||
// TODO: add SpeakerDeck
|
||||
// TODO: add Video
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
'talk': talkCollection,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue