import { z, defineCollection } from 'astro:content'; import { glob } from 'astro/loaders'; const blogCollection = defineCollection({ loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/blog" }), schema: z.object({ title: z.string(), description: z.string(), category: z.string(), lastUpdate: z.string() }), }); const noteCollection = defineCollection({ loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/note" }), schema: z.object({ title: z.string(), description: z.string(), category: z.string(), lastUpdate: z.string() }), }); const translationCollection = defineCollection({ loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/translation" }), schema: z.object({ title: z.string(), description: z.string(), category: z.string(), lastUpdate: z.string() }), }); export const collections = { 'blog': blogCollection, 'note': noteCollection, 'translation': translationCollection, };