chore(site): add Google Search Console verification tag (#1247)

Docusaurus 1.x has no config hook for arbitrary <head> tags, and the
verifier reads the served HTML without running JS, so the homepage tag is
injected during the deploy assemble step. The playground ships it in its
own index.html, in case /playground/ is registered as a separate property.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
pull/1164/merge
MinJae Kwon 4 weeks ago committed by GitHub
parent 67fc9f8668
commit 364c61d478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -85,6 +85,22 @@ jobs:
print("added playground to sitemap")
else:
print("playground already in sitemap")
# Google Search Console ownership check. Docusaurus 1.x has no
# config hook for arbitrary <head> tags, and the verifier reads the
# served HTML without running JS, so the tag is injected into the
# built homepage here.
verification = (
'<meta name="google-site-verification" '
'content="p1XvVxyPOUJ6LYX5rAqSAM27tW2AFMaacg1BTr8mfR4" />'
)
home = Path("_site/index.html")
html = home.read_text()
if "google-site-verification" not in html:
home.write_text(html.replace("<head>", "<head>" + verification, 1))
print("added Search Console verification to homepage")
else:
print("verification tag already present")
PY
- name: Deploy to gh-pages

@ -9,6 +9,9 @@
content="Run the Python diagrams library online. Write Diagram as Code in your browser and render AWS, Azure, GCP and Kubernetes architecture diagrams — no install required."
/>
<link rel="canonical" href="https://diagrams.mingrammer.com/playground/" />
<!-- Search Console ownership, in case /playground/ is registered as its
own URL-prefix property (the site root gets the same tag at deploy). -->
<meta name="google-site-verification" content="p1XvVxyPOUJ6LYX5rAqSAM27tW2AFMaacg1BTr8mfR4" />
<!-- Real diagrams project logo; relative href survives sub-path deploys. -->
<link rel="icon" type="image/png" href="diagrams-logo.png" />

Loading…
Cancel
Save