diff --git a/src/content/cats/maciejpedzich-placeholder.json b/src/content/cats/maciejpedzich-placeholder.json index 473989c..1d7b4ec 100644 --- a/src/content/cats/maciejpedzich-placeholder.json +++ b/src/content/cats/maciejpedzich-placeholder.json @@ -1,5 +1,6 @@ { "name": "Placeholder", + "dateAdded": "2023-09-02T18:50:00.066Z", "description": "This is a placeholder cat with a photo taken from placekitten.com", "image": { "src": "/images/maciejpedzich-placeholder.jpg", diff --git a/src/content/config.ts b/src/content/config.ts index 012ecc6..6f680bf 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -4,6 +4,10 @@ const cats = defineCollection({ type: 'data', schema: z.object({ name: z.string(), + dateAdded: z + .string() + .or(z.date()) + .transform((val) => new Date(val)), description: z.string().max(250), image: z.object({ src: z.string(),