2023-01-26 18:12:20 +00:00
|
|
|
import Document, { Html, Head, Main, NextScript } from "next/document";
|
2023-09-14 11:08:41 +00:00
|
|
|
// constants
|
2024-03-06 13:09:14 +00:00
|
|
|
import Script from "next/script";
|
2023-09-14 11:08:41 +00:00
|
|
|
import {
|
|
|
|
SITE_NAME,
|
|
|
|
SITE_DESCRIPTION,
|
|
|
|
SITE_URL,
|
|
|
|
TWITTER_USER_NAME,
|
|
|
|
SITE_KEYWORDS,
|
|
|
|
SITE_TITLE,
|
2024-03-19 14:38:35 +00:00
|
|
|
} from "@/constants/seo-variables";
|
2023-01-26 18:12:20 +00:00
|
|
|
|
|
|
|
class MyDocument extends Document {
|
|
|
|
render() {
|
2023-11-08 15:01:46 +00:00
|
|
|
const isSessionRecorderEnabled = parseInt(process.env.NEXT_PUBLIC_ENABLE_SESSION_RECORDER || "0");
|
2023-04-14 09:47:35 +00:00
|
|
|
|
2023-01-26 18:12:20 +00:00
|
|
|
return (
|
|
|
|
<Html>
|
|
|
|
<Head>
|
2023-09-14 11:08:41 +00:00
|
|
|
<meta property="og:site_name" content={SITE_NAME} />
|
|
|
|
<meta property="og:title" content={SITE_TITLE} />
|
|
|
|
<meta property="og:url" content={SITE_URL} />
|
|
|
|
<meta name="description" content={SITE_DESCRIPTION} />
|
|
|
|
<meta property="og:description" content={SITE_DESCRIPTION} />
|
|
|
|
<meta name="keywords" content={SITE_KEYWORDS} />
|
|
|
|
<meta name="twitter:site" content={`@${TWITTER_USER_NAME}`} />
|
2023-01-26 18:12:20 +00:00
|
|
|
<meta name="theme-color" content="#fff" />
|
2023-09-14 11:08:41 +00:00
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png" />
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />
|
|
|
|
<link rel="manifest" href="/site.webmanifest.json" />
|
|
|
|
<link rel="shortcut icon" href="/favicon/favicon.ico" />
|
2023-09-15 10:11:10 +00:00
|
|
|
{isSessionRecorderEnabled && process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY && (
|
|
|
|
<Script id="clarity-tracking">
|
|
|
|
{`(function(c,l,a,r,i,t,y){
|
|
|
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
|
|
|
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
|
|
|
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
|
|
|
})(window, document, "clarity", "script", "${process.env.NEXT_PUBLIC_SESSION_RECORDER_KEY}");`}
|
|
|
|
</Script>
|
|
|
|
)}
|
2023-09-14 11:08:41 +00:00
|
|
|
</Head>
|
|
|
|
<body>
|
2024-04-30 13:29:07 +00:00
|
|
|
<div id="context-menu-portal" />
|
2023-09-14 11:08:41 +00:00
|
|
|
<Main />
|
|
|
|
<NextScript />
|
2023-07-27 18:59:47 +00:00
|
|
|
{process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN && (
|
|
|
|
<script
|
|
|
|
defer
|
|
|
|
data-domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
|
|
|
|
src="https://plausible.io/js/script.js"
|
|
|
|
/>
|
|
|
|
)}
|
2023-01-26 18:12:20 +00:00
|
|
|
</body>
|
|
|
|
</Html>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MyDocument;
|