website/src/content/config.ts

19 lines
456 B
TypeScript
Raw Normal View History

2024-03-26 16:36:18 +01:00
import { defineCollection, z } from 'astro:content';
const blogCollection = defineCollection({
schema: z.object({
title: z.string(),
2024-03-27 01:51:42 +01:00
date: z.date(),
2024-03-28 18:30:52 +01:00
headerImg: z.string().optional(),
draft: z.boolean().optional(),
featured: z.boolean().optional(),
_layout: z.enum(['normal', 'transparent']).optional(),
2024-03-26 16:36:18 +01:00
})
});
export const collections = {
2024-03-28 18:30:52 +01:00
'blog': blogCollection,
"projects": blogCollection,
"photos": blogCollection,
2024-03-26 16:36:18 +01:00
};