feat(www): homepage json-ld, canonical, 404 links - #49533
Draft
pamelachia wants to merge 5 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
An agent-readiness scan of supabase.com (is-agentic.com, public report) flagged that the homepage serves no structured data and no canonical tag in raw HTML, and that the 404 page gives crawlers and agents no recovery path. I fixed both.
Changed:
<link rel="canonical" href="/sitelet?url=https%3A%2F%2Fsupabase.com%2F">. The schema builders already existed inlib/json-ld.tsbut were never wired to any page; this reuses the exact inline-script pattern from the blog post pages. The canonical is hardcoded to the production origin on purpose:SITE_ORIGINresolves to the branch URL on previews.divinstead of a secondh1, markedaria-hidden, and getspointer-events-none: browser testing showed the absolutely positioned backdrop was silently swallowing clicks on the new links (positioned elements paint above static siblings for hit-testing even when visually behind).md-alternates.test.tsasserted the literal one-lineralternates: mdAlternates('<slug>'), which the canonical wrapper breaks. I broadened the assertion to accept the spread shape too; the rule it guards (every markdown-served slug advertises its.mdsibling) is unchanged and still enforced.To test
Tested locally against the dev server:
curl -s localhost:3000and parse the twoapplication/ld+jsonblocks: both valid JSON, types Organization and WebSitecurl -s localhost:3000 | grep canonical: expect<link rel="canonical" href="/sitelet?url=https%3A%2F%2Fsupabase.com%2F"/>, with the existingtext/markdownalternate link still presentcurl -s localhost:3000/some-nonexistent-page: expect HTTP 404 with hrefs to/docs,/sitemap.xml,/llms.txtand exactly one<h1>in the bodyOn the Vercel preview (verified via curl + Playwright browser run):
https://supabase.com(prod origin, even on the preview host)/sitemap.xmldocument (this check caught the pointer-events regression, fixed in this PR)Linear