diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-01-28 18:06:53 +0000 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-01-28 18:06:53 +0000 |
| commit | ed52216fb8df3c5c6ed1561ed59699a67a950187 (patch) | |
| tree | 643debcd204e511e0842a68f6946a97a26f51814 /website/src/content.config.ts | |
| parent | 17aa658fb8b86a5caf3d3608f7871e43d09be55a (diff) | |
| parent | c9f6c53a0d9617e3d3a6862b3998322c2a1470c8 (diff) | |
Merge branch 'main' of https://github.com/joeacarstairs/personal-website
Diffstat (limited to 'website/src/content.config.ts')
| -rw-r--r-- | website/src/content.config.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/website/src/content.config.ts b/website/src/content.config.ts new file mode 100644 index 0000000..5436030 --- /dev/null +++ b/website/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|mdx|html)', base: './src/content/blog' }), + schema: z.object({ + title: z.string(), + hidden: z.optional(z.boolean()), + description: z.string(), + pubDate: z.date(), + updatedDate: z.optional(z.date()), + }), +}); + +export const collections = { blog }; |
