chore: add content collections configuration

This commit is contained in:
satnaing
2023-01-26 18:39:58 +06:30
parent 7062fbf527
commit 309f4a3c45
+19
View File
@@ -0,0 +1,19 @@
import { z, defineCollection } from "astro:content";
const blogCollection = defineCollection({
schema: z.object({
author: z.string(),
datetime: z.string(), // z.string().datetime() only available in Zod v3.20.2
title: z.string(),
slug: z.string().optional(),
featured: z.boolean(),
draft: z.boolean(),
tags: z.array(z.string()),
ogImage: z.string().optional(),
description: z.string(),
}),
});
export const collections = {
blog: blogCollection,
};