fix: import z directly from zod to resolve deprecation warnings

This commit is contained in:
2026-04-08 08:44:30 -04:00
parent 3a929fd268
commit 34b6887118

View File

@@ -1,5 +1,6 @@
import { glob } from 'astro/loaders'
import { defineCollection, z } from 'astro:content'
import { defineCollection } from 'astro:content'
import { z } from 'zod'
const blog = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/blog' }),
@@ -23,7 +24,7 @@ const projects = defineCollection({
description: z.string(),
tags: z.array(z.string()),
image: image(),
link: z.string().url().optional(),
link: z.url().optional(),
order: z.number().optional(),
startDate: z.coerce.date().optional(),
endDate: z.coerce.date().optional(),