blob: 1a2452d3b444c07315186a9d59313edd9fb0a8d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { glob } from "astro/loaders";
import { defineCollection } from "astro:content";
import { z } from "astro/zod";
const blog = defineCollection({
loader: glob({
pattern: "**/*.(md|mdx|gmi|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 };
|