fix: import z directly from zod to resolve deprecation warnings
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user