website/src/content/config.ts

13 lines
287 B
TypeScript

import { defineCollection, z } from 'astro:content';
export const collections = {
posts: defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
summary: z.string(),
draft: z.boolean().default(false),
date: z.date(),
}),
}),
};