diff options
| author | Joe Carstairs <65492573+joeacarstairs@users.noreply.github.com> | 2024-03-30 16:43:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-30 16:43:47 +0000 |
| commit | ad32cd2200138b4a57d5d9088672f32a8e7bd2c3 (patch) | |
| tree | 43cb6f1a9804352f666efaaee2bf7d6189906f08 /src/content/config.ts | |
| parent | 9cb047768f79f3d14a5c6bcf420e76d600a20f2d (diff) | |
| parent | 261d89ebed13691e72312f44339063fee93130ac (diff) | |
Merge pull request #1 from joeacarstairs/astro
Astro initial commit
Diffstat (limited to 'src/content/config.ts')
| -rw-r--r-- | src/content/config.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 0000000..58dbc00 --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,19 @@ +import { defineCollection, z } from 'astro:content'; + +const dateSchema = z.object({ + year: z.number(), + month: z.number(), + day: z.number(), +}); + +const blog = defineCollection({ + type: 'content', + schema: z.object({ + title: z.string(), + description: z.string(), + pubDate: dateSchema, + updatedDate: z.optional(dateSchema), + }), +}); + +export const collections = { blog }; |
