fix: allow null values in content schema
This commit is contained in:
parent
383ed03232
commit
ec098dc88f
1 changed files with 3 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ const blog = defineCollection({
|
|||
loader: glob({ pattern: '**/*.{md,mdx}', base: `${contentBase}/blog` }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
description: z.string().nullish(),
|
||||
date: z.coerce.date(),
|
||||
draft: z.boolean().optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
|
|
@ -23,8 +23,8 @@ const projects = defineCollection({
|
|||
description: z.string(),
|
||||
date: z.coerce.date(),
|
||||
draft: z.boolean().optional(),
|
||||
demoURL: z.string().optional(),
|
||||
repoURL: z.string().optional(),
|
||||
demoURL: z.string().nullish(),
|
||||
repoURL: z.string().nullish(),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue