signal-slides/src/content.config.ts
2024-12-14 21:04:49 -03:00

15 lines
412 B
TypeScript

import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders"; // Not available with legacy API
const slides = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/slides" }),
schema: z.object({
title: z.string(),
description: z.string(),
authors: z.array(z.string()),
publishedAt: z.coerce.date(),
}),
});
export const collections = { slides };