docs: prefix star count with ★ glyph and populate it on deploy#447
Conversation
Two changes: 1. Prefix the star count badge with ★ (U+2605), so it reads "★ 4" instead of just "4" in the top-nav. 2. Pass GITHUB_TOKEN to the VitePress build step so the build-time data loader (`stars.data.ts`) can actually fetch the star count. Without it, the badge currently renders empty 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 fixes the blank star-count badge on the deployed docs site by (1) supplying Confidence Score: 5/5Safe to merge — purely cosmetic docs UI change and a CI env-var addition with no security or logic concerns. No P0 or P1 issues found. The GITHUB_TOKEN used is the standard built-in token already granted contents:read at the workflow level. The JS change is guarded by the existing starsData.stars truthy check, so no risk of rendering 'undefined'. All three files are scoped to the docs build pipeline. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant VitePress as VitePress Build
participant SD as stars.data.ts
participant GHAPI as GitHub API
participant Browser as User Browser
GHA->>VitePress: aube run docs:build (env: GITHUB_TOKEN)
VitePress->>SD: load data
SD->>GHAPI: GET /repos/jdx/fnox (Authorization: token)
GHAPI-->>SD: { stargazers_count: N }
SD-->>VitePress: { stars: N }
VitePress-->>GHA: dist/ built with star count baked in
GHA->>GHA: Upload artifact → Deploy to Pages
Browser->>Browser: onMounted() — starsData.stars truthy?
Browser->>Browser: append ★ glyph + count to .star-count span
Reviews (2): Last reviewed commit: "docs: render star glyph in sans-serif sp..." | Re-trigger Greptile |
Wraps the ★ in its own .star-glyph span and switches that span to a sans-serif font. The mono digit font was rendering ★ at 0.6rem as a tiny smudge; sans-serif keeps the glyph crisp without bumping its size relative to the digits.
## Summary Two small changes to the docs: - **Prefix the GitHub star count with ★** (U+2605) in the top-nav social link, so it reads "★ 4" instead of just "4". - **Pass `GITHUB_TOKEN` to the VitePress build step.** Without it, the build-time data loader in `docs/.vitepress/stars.data.ts` falls 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 - [ ] Merge → docs deploy runs → reload https://fnox.jdx.dev/ → top-nav GitHub icon shows "★ N" <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk docs-only change that tweaks UI rendering and CI environment for the VitePress build. Main risk is minor visual/CSS regressions or unexpected behavior if `GITHUB_TOKEN` use affects build-time API calls/rate limits. > > **Overview** > Improves the docs navbar GitHub star badge by prefixing the count with a `★` glyph (added as a separate `.star-glyph` element) and styling it for consistent symbol rendering. > > Updates the GitHub Pages docs workflow to pass `GITHUB_TOKEN` into the VitePress build step so `stars.data.ts` can query the GitHub API during deploy and avoid an empty/zero star count on the live site. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3490ece. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
### 🚜 Refactor - extract providers and core types into fnox-core crate by [@jdx](https://github.com/jdx) in [#458](#458) ### 📚 Documentation - prefix star count with ★ glyph and populate it on deploy by [@jdx](https://github.com/jdx) in [#447](#447) - add favicons and web app manifest by [@jdx](https://github.com/jdx) in [#448](#448) ### 🔍 Other Changes - **(docs)** remove shrill.en.dev analytics script by [@jdx](https://github.com/jdx) in [#457](#457) - **(release)** add musl Linux targets for Alpine compatibility by [@jdx](https://github.com/jdx) in [#452](#452) - add plausible analytics by [@jdx](https://github.com/jdx) in [#451](#451) - bump hk to 1.44.3 by [@jdx](https://github.com/jdx) in [#454](#454) ### 📦️ Dependency Updates - update autofix-ci/action action to v1.3.4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#455](#455) - update apple-actions/import-codesign-certs action to v7 by [@renovate[bot]](https://github.com/renovate[bot]) in [#456](#456)
Summary
Two small changes to the docs:
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 docs-only change that tweaks UI rendering and CI environment for the VitePress build. Main risk is minor visual/CSS regressions or unexpected behavior if
GITHUB_TOKENuse affects build-time API calls/rate limits.Overview
Improves the docs navbar GitHub star badge by prefixing the count with a
★glyph (added as a separate.star-glyphelement) and styling it for consistent symbol rendering.Updates the GitHub Pages docs workflow to pass
GITHUB_TOKENinto the VitePress build step sostars.data.tscan query the GitHub API during deploy and avoid an empty/zero star count on the live site.Reviewed by Cursor Bugbot for commit 3490ece. Bugbot is set up for automated code reviews on this repo. Configure here.