blob: b5fca4ec0c857c2a81bbe37426757d7274729f3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { glob } from "astro/loaders";
import { defineCollection, z } from "astro:content";
const blog = defineCollection({
loader: glob({ pattern: "**/*.{md,mdx}", base: "src/data/blog" }),
schema: z.object({
title: z.string(),
description: z.string(),
publishedAt: z.coerce.date(),
tags: z.array(z.string()).default([]),
}),
});
export const collections = {
blog,
};
|