mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
refactor: update blog schema's author to be optional
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { z } from "astro:content";
|
||||
|
||||
export const blogSchema = z.object({
|
||||
author: z.string(),
|
||||
author: z.string().optional(),
|
||||
pubDatetime: z.date(), // z.string().datetime() only available in Zod v3.20.2
|
||||
title: z.string(),
|
||||
postSlug: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user