Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
TypeScript
123456789101112131415import { defineCollection } from "astro:content"import { glob } from "astro/loaders"import { z } from "astro/zod"
const posts = defineCollection({ loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/posts" }), schema: z.object({ title: z.string(), description: z.string(), published: z.coerce.date(), }),})
export const collections = { posts }