From 3ba1dd462521760bd93c0a06756f336c946f11c8 Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 18 Nov 2023 14:03:06 -0300 Subject: [PATCH] fix astro schema config --- config.ts | 19 +++++++++++++------ portafolio/Piloto Go.md | 17 ++++++++++++++--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/config.ts b/config.ts index de99d3a..b7035de 100644 --- a/config.ts +++ b/config.ts @@ -1,3 +1,4 @@ +import { MediaType } from '@components/MediaGallery/types'; import { z, defineCollection } from 'astro:content'; // AstroJS collection configuration @@ -17,6 +18,7 @@ const games = defineCollection({ 'Wishlist', 'Want to Replay', 'Always Playable', + 'Tried', ]), times_played: z.number(), }), @@ -39,14 +41,19 @@ const portafolio = defineCollection({ title: z.string(), draft: z.boolean().optional(), tags: z.array(z.string()).optional(), + technologies: z.array(z.string()), 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(), - }), - ), + media: z + .array( + z.object({ + type: z.nativeEnum(MediaType), + url: z.string().url(), + alt: z.string(), + mime: z.string().optional(), + }), + ) + .catch([]), }), }); diff --git a/portafolio/Piloto Go.md b/portafolio/Piloto Go.md index 1ecd1ec..d565065 100644 --- a/portafolio/Piloto Go.md +++ b/portafolio/Piloto Go.md @@ -1,13 +1,24 @@ --- title: Piloto Go draft: true -media: +media: + - type: video + url: https://drive.google.com/file/d/198BB5RVjp2t1ExWhX0SfN20hEsW-Nk-l/view?usp=drive_link + alt: this an image + mime: video/mp4 + - type: image + url: https://drive.google.com/file/d/1AuG0g4pugKE-GgwuOpb5eVvRPfR0S4D5/view?usp=drive_link + alt: this an image + - type: image + url: https://drive.google.com/file/d/1hfyHV2c58MVJLofnAy67rzsqhCV1V5u8/view?usp=drive_link + alt: this an image + - type: image + url: https://drive.google.com/file/d/1doIdGSVmyzlV4CwI0KbsOTOQpeZYt9YU/view?usp=drive_link + alt: this an image technologies: - React - NodeJS - MySQL --- -# Piloto Go - This is a web application to manage the stock of product in a construction company and their usage across projects. It also allows to create budgets with the interaction of different actors.