diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-24 08:42:19 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-24 09:00:24 +0000 |
| commit | a8efefc12f21fc3b1fe3c32898cd50d0067b93c6 (patch) | |
| tree | e2224a7dbd15c5f7c4693ca438e7d83027856a69 /src/content.config.ts | |
| parent | 5515d5b2cce3cc43996850ff516fd1838f8fe8eb (diff) | |
Upgrades to Astro 5
Diffstat (limited to 'src/content.config.ts')
| -rw-r--r-- | src/content.config.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/content.config.ts b/src/content.config.ts new file mode 100644 index 0000000..af3f25d --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,14 @@ +import { glob } from 'astro/loaders'; +import { defineCollection, z } from 'astro:content'; + +const news = defineCollection({ + loader: glob({ pattern: '**/*.(md|mdx|html)', base: './src/content/news' }), + schema: z.object({ + title: z.string(), + summary: z.string(), + }), +}); + +export const collections = { + news, +}; |
