Minor post fixes. Makes posts publishable with a date

This commit is contained in:
2025-06-26 14:57:34 -07:00
parent 6a97302539
commit b93123a8c9
4 changed files with 24 additions and 19 deletions

View File

@@ -10,7 +10,8 @@ const blog = defineCollection({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
// Presence of this value indicates that the post is published
pubDate: z.coerce.date().optional(),
updatedDate: z.coerce.date().optional(),
heroImage: image().optional(),
}),