diff options
| author | Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> | 2024-12-23 14:13:29 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> | 2024-12-23 14:13:29 +0100 |
| commit | 3013f352570439832075bab19c9ae91ec6ab98ac (patch) | |
| tree | 37052258a5e4d5859ad9024f99cceb9a38047707 /src/content.config.ts | |
| parent | 16b7b327d43a3d3a2ab0b6317072136d7df69a3d (diff) | |
Update to astro 5
Diffstat (limited to 'src/content.config.ts')
| -rw-r--r-- | src/content.config.ts | 15 |
1 files changed, 15 insertions, 0 deletions
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 +}; |
