From 3013f352570439832075bab19c9ae91ec6ab98ac Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:13:29 +0100 Subject: Update to astro 5 --- src/content.config.ts | 15 +++++++++++++++ 1 file changed, 15 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..539db1c --- /dev/null +++ b/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', base: "src/data/blog" }), + schema: z.object({ + title: z.string(), + metaDescription: z.string(), + publishedAt: z.date() + }) +}); + +export const collections = { + blog +}; -- cgit v1.3