generated from nhcarrigan/template
93a6cf952d
Resolves hydration error from link elements as direct children of html, and adds precedence="default" to the highlight.js stylesheet link.
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
/**
|
|
* @copyright nhcarrigan
|
|
* @license Naomi's Public License
|
|
* @author Naomi Carrigan
|
|
*/
|
|
import Script from "next/script";
|
|
import type { Metadata } from "next";
|
|
import type { JSX, ReactNode } from "react";
|
|
// eslint-disable-next-line import/no-unassigned-import -- Import global styles.
|
|
import "./globals.css";
|
|
|
|
const metadata: Metadata = {
|
|
description: "The personal musings of a transfem software engineer.",
|
|
openGraph: {
|
|
images: "https://cdn.nhcarrigan.com/og-image.png",
|
|
},
|
|
title: "Naomi's Blog",
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
images: "https://cdn.nhcarrigan.com/og-image.png",
|
|
site: "@naomi_lgbt",
|
|
},
|
|
};
|
|
|
|
/**
|
|
* The top-level wrapper for the React application.
|
|
* Handles mounting the shadow DOM.
|
|
* @param opts - The rendering options.
|
|
* @param opts.children - The children elements to render.
|
|
* @returns A JSX element.
|
|
*/
|
|
const RootLayout = ({
|
|
children,
|
|
}: Readonly<{
|
|
children: ReactNode;
|
|
}>): JSX.Element => {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<link href="https://cdn.nhcarrigan.com/logo.png" rel="icon" sizes="any" />
|
|
<link
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css"
|
|
precedence="default"
|
|
rel="stylesheet"
|
|
></link>
|
|
</head>
|
|
<Script
|
|
async={true}
|
|
defer={true}
|
|
src="https://cdn.nhcarrigan.com/headers/index.js"
|
|
strategy={"afterInteractive"}
|
|
type="text/javascript"
|
|
></Script>
|
|
<body>{children}</body>
|
|
</html>
|
|
);
|
|
};
|
|
|
|
export { metadata };
|
|
export default RootLayout;
|