1 import type { Metadata } from "next"
2 import Providers from "@/providers"
3 import "./globals.css"
4 import { BareboneLayout, TightLayout } from "docs-ui"
5 import { config } from "@/config"
6 import clsx from "clsx"
7 import Footer from "../components/Footer"
8 import { inter, robotoMono } from "./fonts"
9
10 const ogImage =
11 "https://res.cloudinary.com/dza7lstvk/image/upload/v1732200992/Medusa%20Resources/opengraph-image_daq6nx.jpg"
12
13 export const metadata: Metadata = {
14 title: {
15 template: `%s - ${config.titleSuffix}`,
16 default: config.titleSuffix || "",
17 },
18 description: config.description,
19 metadataBase: new URL(
20 process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"
21 ),
22 openGraph: {
23 images: [
24 {
25 url: ogImage,
26 type: "image/jpeg",
27 height: "1260",
28 width: "2400",
29 },
30 ],
31 },
32 twitter: {
33 images: [
34 {
35 url: ogImage,
36 type: "image/jpeg",
37 height: "1260",
38 width: "2400",
39 },
40 ],
41 },
42 alternates: {
43 types: {
44 "text/plain": "/llms.txt",
45 },
46 },
47 }
48
49 export default function RootLayout({
50 children,
51 }: {
52 children: React.ReactNode
53 }) {
54 return (
55 <BareboneLayout
56 htmlClassName={clsx(inter.variable, robotoMono.variable)}
57 gaId={process.env.NEXT_PUBLIC_GA_ID}
58 >
59 <TightLayout ProvidersComponent={Providers} footerComponent={<Footer />}>
60 {children}
61 </TightLayout>
62 </BareboneLayout>
63 )
64 }