diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 3b5dca7..0310994 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,6 +2,8 @@ import { SITE } from "src/config"; import "../styles/base.css"; +const googleSiteVerification = import.meta.env.PUBLIC_GOOGLE_SITE_VERIFICATION; + export interface Props { title?: string; author?: string; @@ -61,6 +63,18 @@ const socialImageURL = new URL( 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 && ( + + ) + } +