feat(badges): public catalog page for embedding live rankings#744
Merged
Conversation
The /api/badge/<bench>/<provider> SVG route and its /snippet helper have been live for months but have no discovery surface. Visitors who want to embed their rank on a README or doc had to read source. /badges is the shields.io-style catalog: search, filter by category, preview every (benchmark, provider) pair, copy a Markdown / HTML / URL / JSON snippet for any of them. Chain and region scope dropdowns are exposed when the parent bench declares those dimensions. Each embed is one more permanent backlink from the provider's README or docs site, so this page should also move the needle on referring domains.
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.
Why
The
/api/badge/<bench>/<provider>SVG endpoint and its/snippethelper have been live for months, powering the per-row embed buttons on bench pages and the/partnersdocs. Nothing on the site lets a visitor browse what is available, so providers who land here from search have no way to discover and grab their own badge.What this PR adds
/badgesserver component (src/app/badges/page.tsx) with hero, 5 featured live previews, filterable catalog grid and footer CTAs.src/components/badges-catalog.tsx): provider/bench search, category filter pills, per-pair cards with live SVG preview and rank pill, plus an embed-snippet modal with[Markdown] [HTML] [URL] [JSON]tabs, scope dropdowns (chain / region) when the parent bench declares those dimensions, and a copy button. Snippets are fetched on demand from the existing/snippetroute so a scope change is one network call.src/app/sitemap.ts, priority 0.7, daily).src/components/site-footer.tsx).Impact
Each embedded snippet is a permanent backlink from a provider README, docs site or marketing page back to the matching OCB bench page. The page itself is also a referral-friendly tool that the partners team can point providers to instead of explaining the URL shape over email.
Test plan
/badgesrenders with the 5 preview badges loading inline/badges, footer Developers column links to it