17 lines
424 B
TypeScript
17 lines
424 B
TypeScript
import { z, defineCollection } from 'astro:content'
|
|
import { glob } from 'astro/loaders';
|
|
|
|
const blogCollection = defineCollection({
|
|
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/data/blog" }),
|
|
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,
|
|
}
|