summaryrefslogtreecommitdiff
path: root/examples/portfolio/src/content/config.ts
blob: 06c6bab51f499885f40d8fbd13ac68dd3aa20bd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { defineCollection, z } from 'astro:content';

export const collections = {
	work: defineCollection({
		type: 'content',
		schema: z.object({
			title: z.string(),
			description: z.string(),
			publishDate: z.coerce.date(),
			tags: z.array(z.string()),
			img: z.string(),
			img_alt: z.string().optional(),
		}),
	}),
};