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.
787 B ยท 34 lines
TypeScript
1234567891011121314151617181920212223242526272829303132333435import type { Metadata } from "next";
function host({ slug, customDomain,}: { slug: string; customDomain?: string | null;}) { return customDomain ? `https://${customDomain}` : `https://${slug}.openstatus.dev`;}
// Next.js merges `alternates` shallowly, so a deeper segment that sets it// replaces the parent's entirely โ always return the full object.export function statusPageAlternates({ slug, customDomain, markdownPath = "/.md",}: { slug: string; customDomain?: string | null; markdownPath?: string;}): Metadata["alternates"] { const base = host({ slug, customDomain }); return { canonical: base, types: { "text/markdown": `${base}${markdownPath}`, "application/json": `${base}/api/status/summary.json`, }, };}