diff options
| author | Valentin Popov <valentin@popov.link> | 2026-04-09 11:47:37 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-04-09 11:47:37 +0300 |
| commit | f90592d8a106bea418cbd3d8bce9c2d86029f93c (patch) | |
| tree | b5e4bc36e8b318641d34fd299911babf87b7e5d1 /src/content.config.ts | |
| parent | 12aa763b05e0d5d903e77022afafc6d4bfccad9e (diff) | |
| download | popov.link-f90592d8a106bea418cbd3d8bce9c2d86029f93c.tar.xz popov.link-f90592d8a106bea418cbd3d8bce9c2d86029f93c.zip | |
feat: migrated to Astro 6
Diffstat (limited to 'src/content.config.ts')
| -rw-r--r-- | src/content.config.ts | 18 |
1 files changed, 18 insertions, 0 deletions
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 }; |
