56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
import "./global.css";
|
|
import type { ReactNode } from "react";
|
|
import type { Metadata } from "next";
|
|
import { SITE_URL, SITE_NAME, DEFAULT_DESCRIPTION, DEFAULT_OG_IMAGE } from "@/lib/metadata";
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
default: SITE_NAME,
|
|
template: `%s | ${SITE_NAME}`,
|
|
},
|
|
description: DEFAULT_DESCRIPTION,
|
|
metadataBase: new URL(SITE_URL),
|
|
icons: {
|
|
icon: "/favicon.png",
|
|
shortcut: "/favicon.png",
|
|
apple: "/logo.png",
|
|
},
|
|
openGraph: {
|
|
siteName: SITE_NAME,
|
|
images: [{ url: DEFAULT_OG_IMAGE }],
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
},
|
|
};
|
|
|
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html suppressHydrationWarning>
|
|
<head>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{
|
|
__html: JSON.stringify({
|
|
"@context": "https://schema.org",
|
|
"@type": "WebSite",
|
|
name: SITE_NAME,
|
|
url: SITE_URL,
|
|
description: DEFAULT_DESCRIPTION,
|
|
potentialAction: {
|
|
"@type": "SearchAction",
|
|
target: {
|
|
"@type": "EntryPoint",
|
|
urlTemplate: `${SITE_URL}/search?q={search_term_string}`,
|
|
},
|
|
"query-input": "required name=search_term_string",
|
|
},
|
|
}),
|
|
}}
|
|
/>
|
|
</head>
|
|
<body className="flex min-h-screen flex-col">{children}</body>
|
|
</html>
|
|
);
|
|
}
|