From f90592d8a106bea418cbd3d8bce9c2d86029f93c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 9 Apr 2026 08:47:37 +0000 Subject: feat: migrated to Astro 6 --- src/content.config.ts | 18 ++++++++++++++++++ 1 file changed, 18 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..189848c --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,18 @@ +import { defineCollection } from "astro:content"; +import { glob } from "astro/loaders"; +import { z } from "astro/zod"; + +const blog = defineCollection({ + loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }), + schema: z.object({ + basedOn: z.optional(z.string()), + dateModified: z.coerce.date(), + datePublished: z.coerce.date(), + description: z.string(), + draft: z.optional(z.boolean()), + lang: z.string(), + title: z.string(), + }), +}); + +export const collections = { blog }; -- cgit v1.2.3