aboutsummaryrefslogtreecommitdiffstats
path: root/src/content.config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content.config.ts')
-rw-r--r--src/content.config.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/content.config.ts b/src/content.config.ts
index ed8186c..1c01708 100644
--- a/src/content.config.ts
+++ b/src/content.config.ts
@@ -1,6 +1,20 @@
import { glob } from 'astro/loaders'
import { defineCollection, z } from 'astro:content'
+const events = defineCollection({
+ loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/events' }),
+ schema: ({ image }) =>
+ z.object({
+ title: z.string(),
+ description: z.string(),
+ date: z.coerce.date(),
+ order: z.number().optional(),
+ image: image().optional(),
+ type: z.string().optional(),
+ draft: z.boolean().optional(),
+ }),
+})
+
const blog = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/blog' }),
schema: ({ image }) =>
@@ -46,4 +60,4 @@ const projects = defineCollection({
}),
})
-export const collections = { blog, authors, projects }
+export const collections = { events, blog, authors, projects }