2024-01-21 20:19:34 +08:00

17 lines
419 B
TypeScript

import { defineCollection, z } from 'astro:content'
const postsCollection = defineCollection({
schema: z.object({
title: z.string(),
published: z.date(),
draft: z.boolean().optional(),
description: z.string().optional(),
image: z.string().optional(),
tags: z.array(z.string()).optional(),
category: z.string().optional(),
}),
})
export const collections = {
posts: postsCollection,
}