Skip to content

Add mobile responsiveness, SEO meta tags, and dynamic OG images#49

Merged
rafavalls merged 1 commit into
mainfrom
rafavalls/mobile-responsive-seo
May 12, 2026
Merged

Add mobile responsiveness, SEO meta tags, and dynamic OG images#49
rafavalls merged 1 commit into
mainfrom
rafavalls/mobile-responsive-seo

Conversation

@rafavalls

@rafavalls rafavalls commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • SEO: /d/{token} share pages now inject dynamic <title>, <meta description>, Open Graph, Twitter Card, canonical link, and the diagnosed site's favicon server-side — social crawlers get real metadata instead of the generic "MCP App" defaults
  • OG image: new /og/{token}.png endpoint generates a 1200×630 branded card (Satori + resvg-wasm) showing favicon, site name, health score, and summary; result is cached in R2 so subsequent requests are instant
  • Mobile responsiveness: fixed horizontal overflow in report prose (overflow-wrap: break-word, min-w-0 on ScoreCard summary, overflow-x:auto table wrapper), responsive URL/title truncation (max-w-[200px] sm:max-w-[340px]), and simplified ScoreCard layout (score number top-right, no SVG ring)

Test plan

  • View source on a /d/{token} URL and confirm og:title, og:image, <link rel="icon"> are present with the site's actual name
  • Open /og/{token}.png directly in the browser to verify the generated image renders
  • Use ngrok + developers.facebook.com/tools/debug/ or cards-dev.x.com/validator to preview a share card end-to-end
  • Open a share page on a narrow viewport (375px) and confirm no horizontal overflow in the score card, tables, or URL display

🤖 Generated with Claude Code


Summary by cubic

Adds dynamic SEO metadata and a cached OG image generator for share pages, and improves mobile layout to prevent overflow and simplify the ScoreCard.

  • New Features
    • SEO for /d/{token}: server injects dynamic <title>, meta description, Open Graph, Twitter Card, canonical link, and the diagnosed site's favicon.
    • Dynamic OG image: new /og/{token}.png renders a 1200×630 card (favicon, site name, health score, summary) using satori + @resvg/resvg-wasm, cached in R2 with immutable long‑term headers.
    • Mobile responsiveness: wrap long prose, make tables horizontally scrollable, truncate URL/title on small screens, and simplify the ScoreCard (score number in the top‑right, no SVG ring).

Written for commit 2170200. Summary will update on new commits.

…hare pages (#49)

- Make /d/{token} share pages fully SEO-friendly: inject dynamic title,
  description, Open Graph, Twitter Card, canonical link, and site favicon
  into the server-rendered HTML per diagnostic
- Add /og/{token}.png endpoint that generates a 1200×630 OG image via
  Satori + resvg-wasm (favicon, site name, health score, summary) and
  caches the result in R2
- Fix mobile overflow: add overflow-wrap to report prose, min-w-0 to
  ScoreCard summary, overflow-x:auto table wrapper in react-markdown,
  and responsive URL/title truncation
- Redesign ScoreCard: replace animated SVG ring with score number in
  top-right corner for a simpler, mobile-friendly layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
site-diagnostics 2170200 May 12 2026, 03:46 AM

@rafavalls rafavalls merged commit 942ddde into main May 12, 2026
3 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