diff options
Diffstat (limited to 'examples/with-content/src/content/config.ts')
-rw-r--r-- | examples/with-content/src/content/config.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/with-content/src/content/config.ts b/examples/with-content/src/content/config.ts index 9d436060a..30cbbf293 100644 --- a/examples/with-content/src/content/config.ts +++ b/examples/with-content/src/content/config.ts @@ -2,7 +2,7 @@ import { defineCollection, z } from 'astro:content'; const blog = defineCollection({ // Type-check frontmatter using a schema - schema: { + schema: z.object({ title: z.string(), description: z.string(), // Transform string to Date object @@ -12,7 +12,7 @@ const blog = defineCollection({ .optional() .transform((str) => (str ? new Date(str) : undefined)), heroImage: z.string().optional(), - }, + }), }); export const collections = { blog }; |