From 819321d3b5d1808880d3699de3b590f9d027121f Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 18 Nov 2023 10:48:45 -0300 Subject: [PATCH] Add portafolio schema to astro config --- config.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config.ts b/config.ts index c2ce508..de99d3a 100644 --- a/config.ts +++ b/config.ts @@ -33,7 +33,25 @@ const blog = defineCollection({ }), }); +const portafolio = defineCollection({ + type: 'content', + schema: z.object({ + title: z.string(), + draft: z.boolean().optional(), + tags: z.array(z.string()).optional(), + published_at: z.coerce.date().optional(), + updated_at: z.coerce.date().optional(), + media: z.array( + z.object({ + type: z.enum(['image', 'video']), + url: z.string().url(), + }), + ), + }), +}); + export const collections = { games, blog, + portafolio, };