import type { Metadata, Viewport } from "next"; import "./globals.css"; import { APP_URL, SITE_NAME, SITE_SECONDARY } from "@/lib/env"; import { getLocale } from "@/lib/i18n/server"; export const metadata: Metadata = { metadataBase: new URL(APP_URL), title: { default: `${SITE_NAME} — ${SITE_SECONDARY}`, template: `%s · ${SITE_NAME}` }, description: "An open collection of research working papers in finance, economics, artificial intelligence, real estate, and quantitative science by Simon-Pierre Boucher (Université du Québec en Outaouais).", applicationName: SITE_NAME, openGraph: { type: "website", siteName: SITE_NAME, locale: "en_CA" }, robots: { index: true, follow: true }, }; export const viewport: Viewport = { themeColor: [{ media: "(prefers-color-scheme: light)", color: "#faf8f4" }, { media: "(prefers-color-scheme: dark)", color: "#15161a" }], width: "device-width", initialScale: 1 }; const themeScript = `(function(){try{var m=localStorage.getItem('theme');var d=m==='dark'||((!m||m==='system')&&matchMedia('(prefers-color-scheme: dark)').matches);if(d)document.documentElement.classList.add('dark');}catch(e){}})();`; export default async function RootLayout({ children }: { children: React.ReactNode }) { const locale = await getLocale(); return (
{children} ); }