Skip to content

Commit e6e8ae0

Browse files
authored
Merge branch 'main' into updated-react-docs-urls
2 parents b918916 + 90c5127 commit e6e8ae0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/content/docs/en/guides/assets.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ This is a blog post
160160
A new `image` helper for content collections lets you validate the image metadata using Zod.
161161

162162
```ts title="src/content/config.ts"
163-
import { defineCollection, z, image } from "astro:content";
163+
import { defineCollection, z } from "astro:content";
164+
164165
const blogCollection = defineCollection({
165-
schema: z.object({
166+
schema: ({ image }) => z.object({
166167
title: z.string(),
167168
cover: image().refine((img) => img.width >= 1080, {
168169
message: "Cover image must be at least 1080 pixels wide!",

0 commit comments

Comments
 (0)