build: add google-site-verification tag in the header

This commit is contained in:
satnaing
2022-12-20 22:42:29 +06:30
parent a5936bc3f4
commit d7e28c700f
+14
View File
@@ -2,6 +2,8 @@
import { SITE } from "src/config"; import { SITE } from "src/config";
import "../styles/base.css"; import "../styles/base.css";
const googleSiteVerification = import.meta.env.PUBLIC_GOOGLE_SITE_VERIFICATION;
export interface Props { export interface Props {
title?: string; title?: string;
author?: string; author?: string;
@@ -61,6 +63,18 @@ const socialImageURL = new URL(
onload="this.onload=null;this.rel='stylesheet'" onload="this.onload=null;this.rel='stylesheet'"
/> />
{
// If PUBLIC_GOOGLE_SITE_VERIFICATION is set in the environment variable,
// include google-site-verification tag in the heading
// Learn more: https://support.google.com/webmasters/answer/9008080#meta_tag_verification&zippy=%2Chtml-tag
googleSiteVerification && (
<meta
name="google-site-verification"
content={googleSiteVerification}
/>
)
}
<script is:inline src="/toggle-theme.js"></script> <script is:inline src="/toggle-theme.js"></script>
</head> </head>
<body> <body>