first commit
This commit is contained in:
22
src/content/schemas/projects.ts
Normal file
22
src/content/schemas/projects.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const ProjectSchema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
subtitle: z.string().optional(),
|
||||
description: z.string(),
|
||||
image: z.string().optional(),
|
||||
category: z.enum(['web', 'mobile', 'bot', 'infra', 'other']).default('web'),
|
||||
status: z.enum(['live', 'archived', 'private', 'wip']).default('live'),
|
||||
url: z.string().url().optional(),
|
||||
repoUrl: z.string().url().optional(),
|
||||
stack: z.array(z.string()).default([]),
|
||||
featured: z.boolean().default(false),
|
||||
});
|
||||
|
||||
export const ProjectsSchema = z.object({
|
||||
items: z.array(ProjectSchema),
|
||||
});
|
||||
|
||||
export type Project = z.infer<typeof ProjectSchema>;
|
||||
export type Projects = z.infer<typeof ProjectsSchema>;
|
||||
Reference in New Issue
Block a user