import { z, defineCollection } from 'astro:content'
import { glob } from 'astro/loaders';

const blogCollection = defineCollection({
  loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/data/blog" }),
  schema: z.object({
    title: z.string(),
    tags: z.array(z.string()),
    pubDate: z.date(),
    description: z.string(),
    author: z.string(),
  }),
})

export const collections = {
  blog: blogCollection,
}