chore(seo): verify the site for Search Console with a meta tag - #151
Merged
Conversation
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
Contributor
Deploying with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Search Console offers the
googleXXXX.htmlfile 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 inpublic/whose purpose is not obvious from its name.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 —injectIntoHeadonly stripsog:,twitter:anddescription— 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 underwrangler 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
injectIntoHeadto "every<meta name=…>" would look like tidying and would do exactly that — hence the tests and the comment inindex.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
How was this tested?
pnpm exec tsc -bpnpm lintpnpm testpnpm test:e2e(full suite)Screenshots (if applicable)
N/A — nothing visual; the tag is in the head.
Checklist
pnpm lintpassespnpm exec tsc -bpasses (no type errors)anytypes introducedconsole.logleft in code🤖 Generated with Claude Code
https://claude.ai/code/session_01MyKUa9kaZDJbC7D1j7w2Fs