Add portafolio schema to astro config
This commit is contained in:
parent
ac696830fd
commit
819321d3b5
1 changed files with 18 additions and 0 deletions
18
config.ts
18
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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue