|
| 1 | +import type { Metadata } from "next"; |
| 2 | +import Script from "next/script"; |
| 3 | +import localFont from "next/font/local"; |
| 4 | +import { siteConfig } from "../lib/metadata"; |
| 5 | +import "@katanemo/shared-styles/globals.css"; |
| 6 | +import "./globals.css"; |
| 7 | + |
| 8 | +const ibmPlexSans = localFont({ |
| 9 | + src: [ |
| 10 | + { |
| 11 | + path: "../../../www/public/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf", |
| 12 | + weight: "100 700", |
| 13 | + style: "normal", |
| 14 | + }, |
| 15 | + { |
| 16 | + path: "../../../www/public/fonts/IBMPlexSans-Italic-VariableFont_wdth,wght.ttf", |
| 17 | + weight: "100 700", |
| 18 | + style: "italic", |
| 19 | + }, |
| 20 | + ], |
| 21 | + display: "swap", |
| 22 | + variable: "--font-ibm-plex-sans", |
| 23 | +}); |
| 24 | + |
| 25 | +const baseUrl = new URL(siteConfig.url); |
| 26 | + |
| 27 | +export const metadata: Metadata = { |
| 28 | + title: `${siteConfig.name} - ${siteConfig.tagline}`, |
| 29 | + description: siteConfig.description, |
| 30 | + keywords: siteConfig.keywords, |
| 31 | + metadataBase: baseUrl, |
| 32 | + authors: siteConfig.authors, |
| 33 | + creator: siteConfig.creator, |
| 34 | + icons: { |
| 35 | + icon: "/KatanemoLogo.svg", |
| 36 | + }, |
| 37 | + openGraph: { |
| 38 | + type: "website", |
| 39 | + locale: "en_US", |
| 40 | + url: siteConfig.url, |
| 41 | + title: `${siteConfig.name} - ${siteConfig.tagline}`, |
| 42 | + description: siteConfig.description, |
| 43 | + siteName: siteConfig.name, |
| 44 | + images: [ |
| 45 | + { |
| 46 | + url: siteConfig.ogImage, |
| 47 | + width: 1200, |
| 48 | + height: 630, |
| 49 | + alt: `${siteConfig.name} - ${siteConfig.tagline}`, |
| 50 | + }, |
| 51 | + ], |
| 52 | + }, |
| 53 | + twitter: { |
| 54 | + card: "summary_large_image", |
| 55 | + title: `${siteConfig.name} - ${siteConfig.tagline}`, |
| 56 | + description: siteConfig.description, |
| 57 | + images: [siteConfig.ogImage], |
| 58 | + creator: "@katanemo", |
| 59 | + }, |
| 60 | +}; |
| 61 | + |
| 62 | +export default function RootLayout({ |
| 63 | + children, |
| 64 | +}: Readonly<{ |
| 65 | + children: React.ReactNode; |
| 66 | +}>) { |
| 67 | + return ( |
| 68 | + <html lang="en"> |
| 69 | + <body className={`${ibmPlexSans.variable} antialiased text-white`}> |
| 70 | + {/* Google tag (gtag.js) */} |
| 71 | + <Script |
| 72 | + src="https://www.googletagmanager.com/gtag/js?id=G-RLD5BDNW5N" |
| 73 | + strategy="afterInteractive" |
| 74 | + /> |
| 75 | + <Script strategy="afterInteractive"> |
| 76 | + {` |
| 77 | + window.dataLayer = window.dataLayer || []; |
| 78 | + function gtag(){dataLayer.push(arguments);} |
| 79 | + gtag('js', new Date()); |
| 80 | + gtag('config', 'G-RLD5BDNW5N'); |
| 81 | + `} |
| 82 | + </Script> |
| 83 | + <div className="min-h-screen">{children}</div> |
| 84 | + </body> |
| 85 | + </html> |
| 86 | + ); |
| 87 | +} |
0 commit comments