diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-24 09:26:32 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-24 09:26:32 +0000 |
| commit | 532f75bea033e8073c4c1bc1dff72fa6af7d5316 (patch) | |
| tree | b39d4419a9b23fc210399c6277628b1a2d4f5dee /website/src/content.config.ts | |
| parent | b080e5631416451e548ff4de943e1b6a196225ee (diff) | |
Upgrades to Astro 5
Diffstat (limited to 'website/src/content.config.ts')
| -rw-r--r-- | website/src/content.config.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/website/src/content.config.ts b/website/src/content.config.ts new file mode 100644 index 0000000..5436030 --- /dev/null +++ b/website/src/content.config.ts @@ -0,0 +1,15 @@ +import { glob } from 'astro/loaders'; +import { defineCollection, z } from 'astro:content'; + +const blog = defineCollection({ + loader: glob({ pattern: '**/*.(md|mdx|html)', base: './src/content/blog' }), + schema: z.object({ + title: z.string(), + hidden: z.optional(z.boolean()), + description: z.string(), + pubDate: z.date(), + updatedDate: z.optional(z.date()), + }), +}); + +export const collections = { blog }; |
