17 lines
350 B
TypeScript
17 lines
350 B
TypeScript
|
import { z, defineCollection } from 'astro:content'
|
||
|
|
||
|
const blogCollection = defineCollection({
|
||
|
type: 'content', // v2.5.0 and later
|
||
|
schema: z.object({
|
||
|
title: z.string(),
|
||
|
tags: z.array(z.string()),
|
||
|
pubDate: z.date(),
|
||
|
description: z.string(),
|
||
|
author: z.string(),
|
||
|
}),
|
||
|
})
|
||
|
|
||
|
export const collections = {
|
||
|
blog: blogCollection,
|
||
|
}
|