aria.coffee/src/content.config.ts
2024-12-19 11:53:42 +11:00

17 lines
564 B
TypeScript

// Import the glob loader
import { glob } from "astro/loaders";
// Import utilities from `astro:content`
import { z, defineCollection } from "astro:content";
// Define a `loader` and `schema` for each collection
const blog = defineCollection({
loader: glob({ pattern: "**/[^_]*.md", base: "./src/blog" }),
schema: z.object({
title: z.string(),
pubDate: z.date(),
description: z.string(),
author: z.string(),
tags: z.array(z.string()),
}),
});
// Export a single `collections` object to register your collection(s)
export const collections = { blog };