Files
nextjs-startup/app/layout.tsx
T
Rami Bitar c84dc9dbe7 Organize Vertex starter into reusable sections
Use remote logos and avatars, refine landing copy, and document the template structure.
2026-09-15 10:49:07 -04:00

75 lines
2.0 KiB
TypeScript

import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { ThemeProvider } from "@/components/layout/theme-provider";
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
const siteName = "Vertex — The Unified AI Gateway";
const siteDescription =
"Route, optimize, and observe every AI model request through one OpenAI-compatible API.";
// Absolute origin behind `metadataBase`, so Open Graph images resolve to full
// URLs. Vercel injects VERCEL_PROJECT_PRODUCTION_URL on deployed builds.
const siteUrl =
process.env.NEXT_PUBLIC_SITE_URL ??
(process.env.VERCEL_PROJECT_PRODUCTION_URL
? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
: "http://localhost:3000");
// Routes only set their own `title`; the template appends the site name.
export const metadata: Metadata = {
metadataBase: new URL(siteUrl),
title: {
default: siteName,
template: `%s — ${siteName}`,
},
description: siteDescription,
openGraph: {
type: "website",
siteName,
title: siteName,
description: siteDescription,
url: "/",
images: [
{
url: "/og.png",
width: 1732,
height: 908,
alt: "Vertex — One API for every AI model",
},
],
},
twitter: {
card: "summary_large_image",
title: siteName,
description: siteDescription,
images: ["/og.png"],
},
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en" suppressHydrationWarning className="scroll-smooth">
<body className={`${geistSans.variable} ${geistMono.variable} min-h-screen bg-background font-sans antialiased`}>
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem disableTransitionOnChange>
{children}
</ThemeProvider>
</body>
</html>
);
}