2024-01-21 13:54:41 +09:00
|
|
|
import { defineCollection, z } from 'astro:content'
|
2023-09-26 14:27:38 +08:00
|
|
|
|
2024-01-21 13:54:41 +09:00
|
|
|
const postsCollection = defineCollection({
|
|
|
|
schema: z.object({
|
|
|
|
title: z.string(),
|
|
|
|
published: z.date(),
|
|
|
|
draft: z.boolean(),
|
|
|
|
description: z.string().optional(),
|
|
|
|
image: z.string().optional(),
|
|
|
|
tags: z.array(z.string()).optional(),
|
|
|
|
category: z.string().optional(),
|
|
|
|
}),
|
2023-09-26 14:27:38 +08:00
|
|
|
})
|
|
|
|
export const collections = {
|
2024-01-21 13:54:41 +09:00
|
|
|
posts: postsCollection,
|
|
|
|
}
|