blob: 5436030d68432ac8bd32a2c219eeca4c9c1820cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { glob } from 'astro/loaders';
import { defineCollection, z } from 'astro:content';
const blog = defineCollection({
loader: glob({ pattern: '**/*.(md|mdx|html)', base: './src/content/blog' }),
schema: z.object({
title: z.string(),
hidden: z.optional(z.boolean()),
description: z.string(),
pubDate: z.date(),
updatedDate: z.optional(z.date()),
}),
});
export const collections = { blog };
|