Examples

The contributors directive renders the contributors of a given GitHub repository in a Sphinx documentation page. This page shows the different options available.

Basic usage

List the contributors from a repository:

.. contributors:: dgarcia360/sphinx-contributors

With avatars

Display contributor avatars:

.. contributors:: dgarcia360/sphinx-contributors
   :avatars:

Avatars only

Show only clickable avatars with no text. Hover over an avatar to see the username:

.. contributors:: dgarcia360/sphinx-contributors
   :avatars_only:

With contribution counts

Show how many contributions each user has made:

.. contributors:: dgarcia360/sphinx-contributors
   :contributions:

With real names

Show real names instead of usernames (fetched from GitHub profiles):

.. contributors:: dgarcia360/sphinx-contributors
   :names:

Excluding users

Exclude bots or specific users:

.. contributors:: dgarcia360/sphinx-contributors
   :exclude: dependabot[bot], pre-commit-ci[bot]

Including additional contributors

Manually add contributors not detected by the API (e.g., Co-authored-by contributors):

.. contributors:: dgarcia360/sphinx-contributors
   :include: Peque

Multiple repositories

Merge contributors from multiple repositories into a single list. Contribution counts are summed for users who appear in more than one repository:

.. contributors:: dgarcia360/sphinx-contributors sphinx-doc/sphinx
   :contributions:
   :limit: 10

Limiting and sorting

Control how many contributors are shown and in what order:

.. contributors:: dgarcia360/sphinx-contributors
   :contributions:
   :limit: 3
   :order: ASC

Combining options

Avatars, real names, and contribution counts together:

.. contributors:: dgarcia360/sphinx-contributors
   :avatars:
   :names:
   :exclude: dependabot[bot]

For more information on how to style the list, see Customization.