👥 GitHub contributors table generator
npm install contributors-table   
GitHub contributors table generator
> Powers the contributors-table.vercel.app 😎
- ⚙️ Flexible settings
- 🔗 Hyperlinks to contributors profiles
- 💡 Hints when hovering over an avatar
- 🎨 Customizable
- 🤝 Images supported by Markdown on GitHub and anywhere!
``bash`
npm install contributors-tableIf you are using Bun
bun install contributors-table
`ts
import { generateContributorsTable } from 'contributors-table'
import { Octokit } from '@octokit/core'
const octokit = new Octokit()
const contributorsList = await octokit.request(
'GET /repos/{owner}/{repo}/contributors',
{
owner: 'octocat',
repo: 'Hello-World'
}
)
const image = generateContributorsTable(contributorsList.data)
//
`
#### Use another image format
`ts`
// Generate a PNG image
generateContributorsTable(..., { format: 'png' })
`tstrue
generateContributorsTable(..., {
// The width of the avatars
width: 60,
// Gap between avatars
gap: 10,
// The number of avatars per row
columns: 10,
// Number of rows
rows: 7,
// The roundness of the avatars
roundness: 50,
// Stroke around avatars
strokeWith: 0.8,
// Whether to render avatars on the server side.
// If false - then the browser itself downloads images from GitHub
// If true - then the script takes care of downloading avatars and embedding them
// Always if format != 'svg'``
ssr: true
})
Thank you for considering contributing to contributors-table 😀!
Please read the CONTRIBUTING.md file for more information about how to contribute to this project.
If you like this project, consider supporting it by starring ⭐ it on GitHub, sharing it with your friends, or buying me a coffee ☕
This project is licensed under the MIT License - see the LICENSE file for details.