summaryrefslogtreecommitdiff
path: root/website/src/content/config.ts
blob: 8bcd92d4ad212a2876e03c1436a7be07a455df70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { defineCollection, z } from 'astro:content';

const dateSchema = z.object({
	year: z.number(),
	month: z.number(),
	day: z.number(),
});

const blog = defineCollection({
	type: 'content',
	schema: z.object({
		title: z.string(),
		hidden: z.optional(z.boolean()),
		description: z.string(),
		pubDate: dateSchema,
		updatedDate: z.optional(dateSchema),
	}),
});

export const collections = { blog };