13 lines
412 B
TypeScript
13 lines
412 B
TypeScript
// 1. Import utilities from `astro:content`
|
|
import { defineCollection, z } from 'astro:content';
|
|
|
|
// 2. Import loader(s)
|
|
import { glob, file } from 'astro/loaders';
|
|
|
|
// 3. Define your collection(s)
|
|
const blog = defineCollection({
|
|
loader: glob({ pattern: "**/*.md", base: "./src/data/blog" }),
|
|
});
|
|
|
|
// 4. Export a single `collections` object to register your collection(s)
|
|
export const collections = { blog }; |