Files
michaelrausch-24/src/content/config.ts
T
Michael Rausch 237668fd31 UI updates
2025-10-11 21:06:21 +13:00

45 lines
978 B
TypeScript

import { defineCollection, z } from "astro:content";
const blog = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string(),
date: z.coerce.date(),
draft: z.boolean().optional()
}),
});
const work = defineCollection({
type: "content",
schema: z.object({
company: z.string(),
role: z.string(),
dateStart: z.coerce.date(),
dateEnd: z.union([z.coerce.date(), z.string()]),
linkedinURL: z.string().optional(),
}),
});
const projects = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
description: z.string(),
date: z.coerce.date(),
draft: z.boolean().optional(),
demoURL: z.string().optional(),
repoURL: z.string().optional()
}),
});
const redirects = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
redirect: z.string(),
}),
});
export const collections = { blog, work, projects, redirects };