Skip to content

hunghg255/contributorkit

Repository files navigation

contributorkit

NPM version

Toolkit for generating contributors images.

Usage

Run:

npx contributorkit

Example Setup | GitHub Actions Setup | Generated SVG

Configurations

Create contributorkit.config.js file with:

import { defineConfig, tierPresets } from 'contributorkit'

export default defineConfig({
  outputDir: '.',
  owner: 'vercel',
  repo: 'next.js',
  renders: [
    {
      name: 'contributor',
      width: 800,
      formats: ['svg', 'png'],
    },
    {
      name: 'contributor-wide',
      width: 1000,
      formats: ['svg'],
    },
    {
      renderer: 'circles',
      name: 'contributor-circles',
      width: 1000,
    },
  ],
})

Also check the example.

Utils

Check the type definition or source code for more utils available.

Renderers

We provide two renderers built-in:

  • tiers: Render sponsors in tiers.
  • circles: Render sponsors in packed circles.

Tiers Renderer

Circles Renderer

License

MIT License © 2024 Hung