Something went wrong. Try again.
Fork of Chiri for Astro for my blog forked from quillmatiq.com/augment
Something went wrong. Try again.
1234567891011121314151617181920212223242526import { glob } from 'astro/loaders'import { defineCollection, z } from 'astro:content'
const posts = defineCollection({ // Load Markdown and MDX files in the `src/content/posts/` directory. loader: glob({ base: './src/content/posts', pattern: '**/*.{md,mdx}' }), // Type-check frontmatter using a schema schema: () => z.object({ title: z.string(), // Transform string to Date object pubDate: z.coerce.date(), image: z.string().optional(), atUri: z.string().optional() })})
const about = defineCollection({ // Load Markdown files in the `src/content/about/` directory. loader: glob({ base: './src/content/about', pattern: '**/*.md' }), // Type-check frontmatter using a schema schema: z.object({})})
export const collections = { posts, about }