From a8efefc12f21fc3b1fe3c32898cd50d0067b93c6 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 24 Dec 2024 08:42:19 +0000 Subject: Upgrades to Astro 5 --- src/content.config.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/content.config.ts (limited to 'src/content.config.ts') 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, +}; -- cgit v1.2.3