summaryrefslogtreecommitdiff
path: root/website/src/content/config.ts
diff options
context:
space:
mode:
authorJoe Carstairs <jcarstairs@scottlogic.com>2024-07-15 16:14:08 +0100
committerJoe Carstairs <jcarstairs@scottlogic.com>2024-07-15 16:14:08 +0100
commitea96f40f7c0c535bc4c7d747d347893b78acb6fb (patch)
tree662a098c9026fa43bf1ced4d4ca32394d3fd6958 /website/src/content/config.ts
parentdff4a997f86a245c50350038dde0881a00210f6f (diff)
Blog posts use Date type pubDate
Diffstat (limited to 'website/src/content/config.ts')
-rw-r--r--website/src/content/config.ts10
1 files changed, 2 insertions, 8 deletions
diff --git a/website/src/content/config.ts b/website/src/content/config.ts
index 8bcd92d..dfdf403 100644
--- a/website/src/content/config.ts
+++ b/website/src/content/config.ts
@@ -1,19 +1,13 @@
import { defineCollection, z } from 'astro:content';
-const dateSchema = z.object({
- year: z.number(),
- month: z.number(),
- day: z.number(),
-});
-
const blog = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
hidden: z.optional(z.boolean()),
description: z.string(),
- pubDate: dateSchema,
- updatedDate: z.optional(dateSchema),
+ pubDate: z.date(),
+ updatedDate: z.optional(z.date()),
}),
});