Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657import { z } from "zod";
// Structured data schemasconst howtoStepSchema = z.object({ name: z.string(), text: z.string(), image: z.string().optional(), url: z.string().optional(),});
const howtoSchema = z.object({ totalTime: z.string().optional(), // ISO 8601 duration format (e.g., "PT2H") steps: z.array(howtoStepSchema),});
const faqItemSchema = z.object({ question: z.string(), answer: z.string(),});
// Per-page SEO/social overrides. Each falls back to its top-level twin// (seo.title ?? title, seo.description ?? description); the rest are opt-in.const seoSchema = z .object({ title: z.string(), description: z.string(), ogImage: z.string(), noindex: z.boolean(), canonical: z.string(), }) .partial();
export const metadataSchema = z.object({ title: z.string(), // Visible page heading; falls back to `title`. Lets the on-page h1 differ // from the canonical `title` used for SEO, breadcrumbs, search, and nav. hero: z.string().optional(), publishedAt: z.coerce.date(), // Last meaningful content edit. Feeds og:article:modified_time and JSON-LD // dateModified; falls back to `publishedAt` when absent. updatedAt: z.coerce.date().optional(), description: z.string(), category: z.string(), author: z.string(), image: z.string().optional(), seo: seoSchema.optional(), // Structured data fields howto: howtoSchema.optional(), faq: z.array(faqItemSchema).optional(),});
export type Metadata = z.infer<typeof metadataSchema>;export type SeoData = z.infer<typeof seoSchema>;export type HowToStep = z.infer<typeof howtoStepSchema>;export type HowToData = z.infer<typeof howtoSchema>;export type FAQItem = z.infer<typeof faqItemSchema>;