Skip to content

Conversation

@DipakHalkude
Copy link

Description

This PR adds a GitHub stars count button to the Nx marketing site header to showcase the project's community traction and provide social proof.

Changes

  • Added a GitHub stars button in the header's secondary navigation section
  • Uses consistent styling with existing header buttons
  • Includes proper accessibility attributes and security rel tags
  • Displays current star count (27.2k)

Implementation Details

  • Button links to https://github.com/nrwl/nx
  • Uses GitHub octicon SVG for the star icon
  • Currently displays static count of "27.2k" (can be made dynamic in future)
  • Follows existing Tailwind CSS patterns and color schemes
  • Positioned before the existing GitHub icon in the header

Benefits

  • Highlights Nx's growing community (27.2k+ stars)
  • Encourages more GitHub stars through visibility
  • Adds credibility for new visitors exploring Nx
  • Consistent with common open-source project patterns

Testing

  • Button appears in header on desktop view
  • Clicking button opens Nx GitHub repo in new tab
  • Styling matches existing header buttons

Closes #33028

@DipakHalkude DipakHalkude requested a review from a team as a code owner October 23, 2025 20:39
@DipakHalkude DipakHalkude requested a review from jaysoo October 23, 2025 20:39
@netlify
Copy link

netlify bot commented Oct 23, 2025

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d84cbc4

@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Oct 31, 2025 2:07pm

@DipakHalkude
Copy link
Author

DipakHalkude commented Oct 24, 2025

@barbados-clemens @FrozenPandaz @jaysoo Please have a look :)

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Oct 28, 2025

View your CI Pipeline Execution ↗ for commit b29b613

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 6m 22s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 29s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-28 20:01:33 UTC

@barbados-clemens
Copy link
Contributor

Hey @DipakHalkude sorry for the late reply here, but yeah style looks good. like @julekgwa mentioned if we can get the live value so we don't have to maintain the value. the data should already be in the content collection since we fetch the plugin stats for the nx repo. logic is in the plugin.loader.ts. but should be able to get the nx overview entry in the header component. you can use the largeNumberFormatter from the formatters.ts file to format the value. as well.

Copy link
Contributor

@barbados-clemens barbados-clemens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style looks fine just want to make it dynamic so we don't need to manually update the value

@DipakHalkude
Copy link
Author

Ok I am on it :)

- Replace hardcoded '27.2k' with dynamic star count from GitHub API
- Use inline formatter function to respect monorepo boundaries
- Fetch real-time stargazers count from nrwl/nx repository
@DipakHalkude
Copy link
Author

@barbados-clemens Please have a look :)

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
@DipakHalkude
Copy link
Author

DipakHalkude commented Oct 29, 2025

Done from my side :) Thank you for the suggestion @barbados-clemens @julekgwa

@juristr
Copy link
Member

juristr commented Oct 29, 2025

we should also be aware of the space in the header nav. So I'd just opt for having either of the two GitHub buttons there
image

@DipakHalkude
Copy link
Author

DipakHalkude commented Oct 29, 2025

We can remove the second one as when we are clicking on any of the button it goes to github repo only. So we can remove the 2nd one

@DipakHalkude
Copy link
Author

DipakHalkude commented Oct 29, 2025

@juristr What you think?

<a
title="Nx is open source, check the code on GitHub"
href="https://github.com/nrwl/nx"
target="_blank"
rel="noreferrer"
className="inline-flex items-center px-3 py-2 opacity-60 hover:opacity-90"
>
<span className="sr-only">Nx on GitHub</span>
<GitHubIcon aria-hidden="true" className="h-5 w-5" />
</a>

We can remove this one!
Just waiting for your response then I make changes. Thank you :)

@DipakHalkude
Copy link
Author

DipakHalkude commented Oct 31, 2025

@juristr I guess now the implementation looks great :)

@DipakHalkude
Copy link
Author

@juristr @barbados-clemens Can someone review this :)

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.

add: github stars count

4 participants