aboutsummaryrefslogtreecommitdiff
path: root/src/content/config.ts
blob: 984181c01932890e2a268f00c46050b921c39b2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { defineCollection, z } from "astro:content";

const blog = defineCollection({
	type: "content",
	schema: z.object({
		basedOn: z.optional(z.string()),
		dateModified: z.coerce.date(),
		datePublished: z.coerce.date(),
		description: z.string(),
		draft: z.optional(z.boolean()),
		lang: z.string(),
		preview: z.optional(z.string()),
		title: z.string(),
	}),
});

export const collections = { blog };