Files for my website
bwc9876.dev
1import { z, defineCollection } from "astro:content";
2
3const projectsCollection = defineCollection({
4 schema: z.object({
5 name: z.string(),
6 summary: z.string(),
7 tags: z.array(z.string()),
8 timespan: z.object({
9 from: z.number(),
10 to: z.number().or(z.string()).optional()
11 }),
12 image: z
13 .object({
14 src: z.string(),
15 width: z.number(),
16 height: z.number()
17 })
18 .optional(),
19 links: z
20 .object({
21 github: z.string().optional(),
22 other: z.record(z.string()).optional()
23 })
24 .optional()
25 })
26});
27
28export const collections = {
29 projects: projectsCollection
30};