first commit
This commit is contained in:
35
src/content/schemas/profile.ts
Normal file
35
src/content/schemas/profile.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const ProfileSchema = z.object({
|
||||
name: z.string(),
|
||||
title: z.string(),
|
||||
tagline: z.string(),
|
||||
bio: z.string(),
|
||||
available: z.boolean().default(false),
|
||||
availableLabel: z.string().optional(),
|
||||
hero: z.object({
|
||||
photo: z.string(),
|
||||
photos: z.array(z.string()).default([]),
|
||||
roles: z.array(z.string()).default([]),
|
||||
cta: z
|
||||
.array(
|
||||
z.object({
|
||||
label: z.string(),
|
||||
href: z.string(),
|
||||
variant: z.enum(['primary', 'ghost']).default('primary'),
|
||||
external: z.boolean().default(false),
|
||||
}),
|
||||
)
|
||||
.default([]),
|
||||
}),
|
||||
socials: z.object({
|
||||
email: z.string().email().optional(),
|
||||
github: z.string().url().optional(),
|
||||
gitea: z.string().url().optional(),
|
||||
linkedin: z.string().url().optional(),
|
||||
website: z.string().url().optional(),
|
||||
}),
|
||||
cv: z.string().optional(),
|
||||
});
|
||||
|
||||
export type Profile = z.infer<typeof ProfileSchema>;
|
||||
Reference in New Issue
Block a user