import { z } from 'zod' const seoSchema = z .object({ title: z.string().optional(), description: z.string().optional(), image: z .object({ src: z.string(), alt: z.string().optional() }) .optional(), pageType: z.enum(['website', 'article']).default('website'), }) .partial() export const postFrontmatterSchema = z.object({ title: z.string(), slug: z.string().optional(), subtitle: z.string().optional(), author: z.string().optional(), excerpt: z.string().optional(), publishDate: z.coerce.date(), updatedDate: z.coerce.date().optional(), isFeatured: z.boolean().default(false), tags: z.array(z.string()).default([]), seo: seoSchema.optional(), }) export const projectFrontmatterSchema = z.object({ title: z.string(), description: z.string().optional(), publishDate: z.coerce.date(), isFeatured: z.boolean().default(false), seo: seoSchema.optional(), }) export const pageFrontmatterSchema = z.object({ title: z.string(), description: z.string().optional(), subtitle: z.string().optional(), seo: seoSchema.optional(), }) export type PostFrontmatter = z.infer export type ProjectFrontmatter = z.infer export type PageFrontmatter = z.infer