From 3d086dedf5a5f9bfa24b64ff6c532e321e136785 Mon Sep 17 00:00:00 2001 From: sirlilpanda Date: Tue, 28 Jul 2026 22:44:35 +1200 Subject: [PATCH] adding image collection object --- src/content.config.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/content.config.ts b/src/content.config.ts index 1f06368..f4f3995 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -17,4 +17,18 @@ const blog = defineCollection({ }), }); -export const collections = { blog }; +const album = defineCollection({ + loader : glob({base : './src/content/pictures/', pattern : '**/*.yaml'}), + schema: ({image}) => + z.object({ + title : z.string(), + description : z.string(), + cover : image() + }), +}); + + +export const collections = { + blog, + album, +};