Skip to content

Commit

Permalink
Add pubDate and updateDate fields to type definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
emeraldjava committed Jun 6, 2024
1 parent a33f327 commit e8eceb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ const blog = defineCollection({
schema: ({ image }) =>
z.object({
author: z.string().default(SITE.author),
pubDatetime: z.date(),
modDatetime: z.date().optional().nullable(),
pubDate: z.coerce.date().optional(),
updatedDate: z.coerce.date().optional(),
pubDatetime: z.coerce.date(),
modDatetime: z.coerce.date().optional().nullable(),
title: z.string(),
featured: z.boolean().optional(),
draft: z.boolean().optional(),
Expand Down

0 comments on commit e8eceb5

Please sign in to comment.