Skip to content

chore(seo): verify the site for Search Console with a meta tag - #151

Merged
aquie00t merged 1 commit into
mainfrom
chore/google-site-verification
Aug 30, 2026
Merged

chore(seo): verify the site for Search Console with a meta tag#151
aquie00t merged 1 commit into
mainfrom
chore/google-site-verification

Conversation

@aquie00t

Copy link
Copy Markdown
Contributor

Summary

Search Console offers the googleXXXX.html file method first, but the meta tag is equivalent — Google accepts either — and it is the better fit here: it lives in the shell we already own rather than as a loose file in public/ whose purpose is not obvious from its name.

<meta
    name="google-site-verification"
    content="UZeGKB2iQEwOfEpmzsT7nPypL0QRHD7S5uD-dUKU0CQ"
/>

The one thing worth checking before doing this: our Worker rewrites the <head> on every route, so the tag has to survive that. It does — injectIntoHead only strips og:, twitter: and description — and that is now held down by tests at both layers rather than left as a happy accident:

  • worker/index.test.ts — parameterised over /, /explore, /post/:id, /articles/:slug; the shell fixture carries the tag and exactly one must come out the other side.
  • e2e/worker/worker.spec.ts — the same assertion against the real built shell under wrangler dev, which is what Search Console actually fetches.

Ownership is re-checked periodically rather than verified once, so this is not a tag that can be cleaned up later: removing it un-verifies the property and drops the sitemap reporting with it, silently. Widening the strip in injectIntoHead to "every <meta name=…>" would look like tidying and would do exactly that — hence the tests and the comment in index.html.

Follows #150, which gave every page its own title, canonical and sitemap entry. Verifying the property is what lets us submit the sitemap and watch it get crawled.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Dependency update
  • Documentation

How was this tested?

pnpm exec tsc -b clean
pnpm lint clean
pnpm test 635 / 635 passing (75 files)
pnpm test:e2e (full suite) 49 / 49 passing

Screenshots (if applicable)

N/A — nothing visual; the tag is in the head.

Checklist

  • pnpm lint passes
  • pnpm exec tsc -b passes (no type errors)
  • Tested on mobile viewport (or N/A) — N/A
  • No new any types introduced
  • No console.log left in code
  • SEO / OG meta not regressed (if UI change)

The token is not a secret — it is served in the page source to anyone who asks, which is how verification works.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MyKUa9kaZDJbC7D1j7w2Fs

Search Console offers a googleXXXX.html file first, but the tag is
equivalent and lives with the shell rather than as a loose file in
`public/` whose purpose is not obvious from its name.

Ownership is re-checked periodically rather than once, so the tag has to
survive the Worker's rewrite of the head. It does — `injectIntoHead` only
strips `og:`, `twitter:` and `description` — and that is now held down at
both layers: over four routes in the Worker's unit tests, and against the
real built shell in the `worker` e2e project. Widening that strip to every
`<meta name=…>` would look like tidying and would quietly un-verify the
property, taking the sitemap reporting with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MyKUa9kaZDJbC7D1j7w2Fs
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tdn-client 221d61e Commit Preview URL

Branch Preview URL
Aug 30 2026, 06:36 AM

@aquie00t
aquie00t merged commit b93554b into main Aug 30, 2026
8 checks passed
@aquie00t
aquie00t deleted the chore/google-site-verification branch August 30, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant