Files
blog/src/app/layout.tsx
T
hikari 93a6cf952d
Node.js CI / CI (pull_request) Failing after 20s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m48s
fix: move link tags into head and add stylesheet precedence
Resolves hydration error from link elements as direct children of html,
and adds precedence="default" to the highlight.js stylesheet link.
2026-03-03 18:16:40 -08:00

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;