docs: prefix star count with ★ glyph and populate it on deploy#606
Conversation
Three small changes: - Wrap a sans-serif ★ (U+2605) in a .star-glyph span before the star count, so the badge reads "★ N" instead of just "N". The sans-serif font keeps the glyph crisp at 0.6rem (the mono digit font renders ★ as a smudge at this size). - Add CSS for the new .star-glyph span. - Pass GITHUB_TOKEN to the VitePress build step. Without it, the build-time data loader (`stars.data.ts`) falls back to 0 and returns "", so the badge currently renders blank on the live site.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Greptile SummaryThis PR adds a ★ glyph before the GitHub star count in the nav badge, applies a sans-serif font to keep it crisp at small sizes, and fixes the live-site blank badge by passing Confidence Score: 5/5Safe to merge — all three changes are small, correct, and limited in scope. No logic errors or security issues found. The No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant Build as VitePress Build
participant API as GitHub API
participant Browser as User Browser
GH->>Build: run docs:build with GITHUB_TOKEN
Build->>API: GET /repos/jdx/usage Bearer token
API-->>Build: stargazers_count N
Build->>Build: formatStars(N) returns Nk string
Build->>Build: embed starsData.stars in static bundle
Note over Browser: On page load
Browser->>Browser: onMounted calls addStarCount
Browser->>Browser: create span.star-count
Browser->>Browser: create span.star-glyph aria-hidden with star char
Browser->>Browser: badge.append glyph and Nk text
Browser->>Browser: githubLink.appendChild badge
Note over Browser: Nav shows star Nk
Reviews (1): Last reviewed commit: "docs: prefix star count with ★ glyph and..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #606 +/- ##
=======================================
Coverage 79.03% 79.03%
=======================================
Files 48 48
Lines 7235 7235
Branches 7235 7235
=======================================
Hits 5718 5718
Misses 1140 1140
Partials 377 377 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Three small changes to the docs:
.star-glyphspan before the count, so the badge reads "★ N" instead of just "N". Switching to sans-serif keeps the glyph crisp at 0.6rem — the mono digit font renders ★ as a smudge at this size..star-glyphspan.GITHUB_TOKENto the VitePress build step. Without it, the build-time data loader indocs/.vitepress/stars.data.tsfalls back to 0 and returns an empty string, so the badge currently renders blank on the live site (curl-verified). With the token set, the loader can hit the GitHub API and populate the count.Test plan
Note
Low Risk
Low risk UI/CSS tweak plus a GitHub Actions env var change; main risk is only around the docs build step now relying on
GITHUB_TOKENfor API calls/rate limits.Overview
Docs Pages builds now pass
GITHUB_TOKENinto the VitePress build so thestars.dataloader can successfully query the GitHub API and populate the star badge.The GitHub social link star badge UI is updated to render as
★ Nby inserting a dedicated.star-glyphelement and styling it with a sans-serif font for crisp rendering at small sizes.Reviewed by Cursor Bugbot for commit 90998ab. Bugbot is set up for automated code reviews on this repo. Configure here.