feat(open-knowledge): GitHub star count in docs site nav#382
Merged
Conversation
* feat(open-knowledge): show GitHub star count in docs site nav
Add a live GitHub star count to the docs marketing nav, rendered as a
bordered split pill (GitHub label │ divider │ star + count) beside the
social links. The count is fetched server-side in the (home) layout via
a new getGitHubStars() helper (cached hourly, degrades to null on any
failure) and passed to the client SiteNav. Also reflows the desktop nav
so Docs sits beside the logo on the left.
* add golden-sun-300 color var
* fix(open-knowledge): mobile GitHub nav row + review polish
Address review feedback on the docs-site GitHub star nav:
- Mobile: render GitHub as a full-width row (icon + label, count pushed
to the trailing edge) instead of reusing the desktop pill, which
floated a fixed-width pill among full-width hamburger rows. Adds a
`variant` ('pill' | 'row') to GitHubStarButton.
- a11y: give the three sibling <nav> landmarks distinct aria-labels
(Primary / Secondary / Mobile) per WCAG 2.4.1.
- Hoist the full-number Intl.NumberFormat to module scope instead of
allocating per render, matching the existing starFormatter.
- github-stars: console.warn on non-2xx (429/403) before returning null
so a missing badge is distinguishable from a rate-limit incident in
logs, matching download-links.ts.
* fix(open-knowledge): log fetch failures in getGitHubStars catch path
Warn on network/DNS failures and the 5s-timeout AbortError for parity
with the non-2xx path, so neither failure mode is silent in logs.
---------
GitOrigin-RevId: a8d3fa513f6c473a2a9420f3ada24e21051c3f75
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28410256461). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
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.
No description provided.