feat: use date not publishDate

This commit is contained in:
KazooTTT
2024-07-25 17:48:35 +08:00
parent 0b8b30c99c
commit d99e484aa9
7 changed files with 21 additions and 18 deletions

View File

@ -13,14 +13,10 @@ const post = defineCollection({
z.object({
title: z.string().max(60),
description: z.string(),
publishDate: z
date: z
.string()
.or(z.date())
.transform((val) => new Date(val)),
updatedDate: z
.string()
.optional()
.transform((str) => (str ? new Date(str) : undefined)),
coverImage: z
.object({
src: image(),

View File

@ -1,6 +1,6 @@
---
title: 如何在 Cursor 中使用 DeepSeek-Coder
publishDate: 2024-07-25
date: 2024-07-25
author: KazooTTT
type: Post
status: Draft