diff --git a/examples/blog/src/content/config.ts b/examples/blog/src/content/config.ts index f0419223e7..667a31cc73 100644 --- a/examples/blog/src/content/config.ts +++ b/examples/blog/src/content/config.ts @@ -1,6 +1,7 @@ import { defineCollection, z } from 'astro:content'; const blog = defineCollection({ + type: 'content', // Type-check frontmatter using a schema schema: z.object({ title: z.string(), diff --git a/examples/portfolio/src/content/config.ts b/examples/portfolio/src/content/config.ts index 049465c9f8..06c6bab51f 100644 --- a/examples/portfolio/src/content/config.ts +++ b/examples/portfolio/src/content/config.ts @@ -2,6 +2,7 @@ import { defineCollection, z } from 'astro:content'; export const collections = { work: defineCollection({ + type: 'content', schema: z.object({ title: z.string(), description: z.string(),