fuwari/src/content/config.ts

15 lines
412 B
TypeScript
Raw Normal View History

import { z, defineCollection } from "astro:content";
const blogCollection = defineCollection({
schema: z.object({
title: z.string(),
2023-10-18 21:24:51 +08:00
published: z.date(),
description: z.string().optional(),
2023-10-21 10:52:01 +08:00
image: z.string().optional(),
2023-10-18 21:24:51 +08:00
tags: z.array(z.string()).optional(),
category: z.string().optional(),
})
})
export const collections = {
'blog': blogCollection,
}