refactor: move submodule into this repo

This commit is contained in:
Alexander Navarro 2023-12-17 20:58:58 -03:00
parent b6450742d1
commit 4f903c3c8d
329 changed files with 234691 additions and 20 deletions

68
src/content/config.ts Normal file
View file

@ -0,0 +1,68 @@
import { MediaType } from '@components/MediaGallery/types';
import { z, defineCollection } from 'astro:content';
// AstroJS collection configuration
const games = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
has_content: z.boolean().optional(),
date_added: z.coerce.date(),
release: z.coerce.date(),
developers: z.array(z.string()),
genres: z.array(z.string()),
status: z.enum([
'Backlog',
'On Line',
'Playing',
'Played',
'Wishlist',
'Want to Replay',
'Always Playable',
'Tried',
]),
times_played: z.number(),
}),
});
const blog = 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(),
}),
});
const portafolio = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
draft: z.boolean().optional(),
status: z.enum(['Backlog', 'Activo', 'Fixes', 'Finalizado']),
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.nativeEnum(MediaType),
url: z.string(),
alt: z.string(),
mime: z.string().optional(),
thumbnail: z.string().optional(),
}),
)
.catch([]),
}),
});
export const collections = {
games,
blog,
portafolio,
};