Skip to content

Add GitHub star counter to benchmark pages#1033

Merged
alexey-milovidov merged 2 commits into
mainfrom
github-star-counter
Jul 22, 2026
Merged

Add GitHub star counter to benchmark pages#1033
alexey-milovidov merged 2 commits into
mainfrom
github-star-counter

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Adds a GitHub star counter to the right of the title on every benchmark HTML page:

  • index.html (main ClickBench)
  • hardware/index.html
  • versions/index.html
  • gravitons/index.html
  • playground/index.html

Details

  • Each <h1> and a new star badge are wrapped in a <div class="title-row"> (flexbox), so the counter sits inline to the right of the title and wraps gracefully on narrow screens.
  • The badge is a styled pill with a GitHub star octicon, a "Star" label, and the full live star count (e.g. 1234, not 1.2k), linking to the repo.
  • A small inline script fetches stargazers_count from the GitHub REST API and caches it in localStorage for 6 hours to avoid unauthenticated rate limits on repeat visits.
  • Graceful degradation: if the API call fails or is rate-limited, the badge still shows "★ Star" and links to the repo — just without a number.
  • Colors are theme-neutral on the four main pages (light/dark) and use the playground's own CSS variables on the playground page.

The hardware/gravitons generate-results.sh scripts only rewrite the in-page data block, so these header/script edits survive regeneration.

🤖 Generated with Claude Code

alexey-milovidov and others added 2 commits July 23, 2026 00:24
Add a GitHub star counter to the right of the title on every benchmark
HTML page: main ClickBench, hardware, versions, gravitons, and playground.

The counter is a styled badge linking to the repo, showing the full live
star count fetched from the GitHub API and cached in localStorage for 6
hours to avoid rate limits. It degrades gracefully to a plain "Star" link
if the API is unavailable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov self-assigned this Jul 22, 2026
@alexey-milovidov
alexey-milovidov merged commit a2d5c5a into main Jul 22, 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