Skip to content

feat(seo): md alternate tags + copy/ask actions - #72

Merged
pamelachia merged 8 commits into
mainfrom
pamela/growth-1015-multigrescom-alternate-tags-explicit-llmstxt-content-type
Jul 28, 2026
Merged

pamelachia merged 8 commits into
mainfrom
pamela/growth-1015-multigrescom-alternate-tags-explicit-llmstxt-content-type

Conversation

@pamelachia

@pamelachia pamelachia commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

multigres.com serves markdown for every docs page, blog post, and the homepage, but nothing advertised it: agents had to know the .md convention in advance. This adds the discovery layer on top of the Accept/.md negotiation locked in by #71, and standardizes the on-page affordance to Copy Markdown + Ask ChatGPT/Claude.

Changed:

  • Agents can discover markdown from any HTML page: docs pages, blog posts, and the homepage now emit <link rel="alternate" type="text/markdown" href="<absolute .md sibling>">. The homepage sibling gains a /index.md URL (the middleware previously only answered /.md), matching the docs-root index.md shape; /.md keeps working.
  • llms.txt / llms-full.txt Content-Type is now an explicit contract: both handlers relied on the Fetch-spec default for string bodies (production already served text/plain;charset=UTF-8); the header is now set explicitly so a runtime change can't silently alter it.
  • Docs view-options popover replaced by inline actions: the upstream popover hardcodes four extra entries (View as Markdown, Open in GitHub, and two third-party AI tools) with no props to disable them, so the kept entries (Ask ChatGPT, Ask Claude) are now inline links beside the existing Copy button via a shared MarkdownActions component. URL templates, prompt text, and brand icons are byte-identical to what the popover generated.
  • Blog posts and the homepage gain the same affordance: both served markdown with zero UI; they now render the same MarkdownActions row.
  • Copy/ask/GitHub clicks are measured: ask_ai_clicked (agent: chatgpt | claude), copy_as_markdown_clicked (fires only after a successful clipboard write), and multigres_github_clicked (source: hero | nav | footer). The first two match the supabase.com docs event names so readouts can union both sites and split by host; the GitHub event is deliberately site-prefixed since the supabase.com equivalent (homepage_github_button_clicked) has a different shape, so no name union is possible there anyway. Sent through the existing PostHog client (pageviews already flow; autocapture is off at the project level, so explicit events are required).

Note: placement screenshots (docs header, blog header, homepage hero at desktop + mobile) reviewed before this leaves draft.

To test

Previews are behind Deployment Protection, so pre-merge verification ran against the built Nitro function locally (14-check fetch matrix, all green); the same matrix re-runs as curl against production after merge:

  • Alternate tag on /, /docs, /docs/architecture, /blog/listen-notify — each pointing at an absolute .md sibling that 200s as text/markdown
  • /index.md serves the homepage markdown; /.md still works
  • /llms.txt + /llms-full.txt return text/plain; charset=utf-8 (GET + HEAD)
  • Bare */* Accept still gets HTML on docs (no negotiation regression)
  • types:check error count unchanged vs main (4 pre-existing); naming lint green
  • Vercel preview (authed browser): actions row on all three surfaces, tags present, .md + llms serving verified in-browser
  • Preview clicks ingested into PostHog (project 34344, preview $host): ask_ai_clicked agent=chatgpt + agent=claude, copy_as_markdown_clicked after successful clipboard write
  • Post-merge: prod curl matrix re-run; spot-check multigres_github_clicked ingestion (same capture path as the verified events)

Linear

  • fixes GROWTH-1015

Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
…rapper

Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
@pamelachia pamelachia self-assigned this Jul 28, 2026
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multigres-site Ready Ready Preview, Comment Jul 28, 2026 5:13pm

Request Review

@pamelachia
pamelachia marked this pull request as ready for review July 28, 2026 16:25
Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
Signed-off-by: Pamela Chia <pamelachiamayyee@gmail.com>
@pamelachia
pamelachia merged commit 4bdcc24 into main Jul 28, 2026
4 checks passed
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