https://github.com/tkoyama010/sphinx-all-contributors
all-contributors for Sphinx users
https://github.com/tkoyama010/sphinx-all-contributors
acknowledgements all-contributors contributors docs documentation documentation-tool open-source open-source-mane open-source-tooling python recognition restructuredtext sphinx sphinx-doc sphinx-docs sphinx-documentation sphinx-extension
Last synced: 10 months ago
JSON representation
all-contributors for Sphinx users
- Host: GitHub
- URL: https://github.com/tkoyama010/sphinx-all-contributors
- Owner: tkoyama010
- License: mit
- Created: 2024-09-04T05:06:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-10T23:55:50.000Z (over 1 year ago)
- Last Synced: 2025-02-11T00:30:24.129Z (over 1 year ago)
- Topics: acknowledgements, all-contributors, contributors, docs, documentation, documentation-tool, open-source, open-source-mane, open-source-tooling, python, recognition, restructuredtext, sphinx, sphinx-doc, sphinx-docs, sphinx-documentation, sphinx-extension
- Language: Python
- Homepage: https://sphinx-all-contributors.readthedocs.io/en/stable/
- Size: 88.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# sphinx-all-contributors

[](https://sphinx-all-contributors.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/astral-sh/ruff)
[](https://github.com/prettier/prettier)
`sphinx-all-contributors` is a Sphinx extension that allows you to easily display a list of contributors from a `.all-contributorsrc` file in your Sphinx documentation. The list is generated in a simple, readable format like:
```
- Contributor Name 1 for ideas, docs
- Contributor Name 2 for code
```
## Features
- Automatically reads the list of contributors from a `.all-contributorsrc` file.
- Customizable relative path to the `.all-contributorsrc` file.
- Outputs a list of contributors in a clean, human-readable format.
## Installation
[](https://pypi.org/project/sphinx-all-contributors/)
```shell
pip install sphinx-all-contributors
```
## Usage
Add `sphinx-all-contributors` to the `extensions` list in your `conf.py`:
```python
# conf.py
extensions = [
"sphinx_all_contributors",
# other extensions
]
```
Create a `.all-contributorsrc` file in your documentation source directory (or another location). You can create this file manually following the [all-contributors](https://allcontributors.org/docs/en/bot/configuration) format, or you can use the [all-contributors bot](https://allcontributors.org/docs/en/bot/overview) to automate this process and ensure that your contributor data is accurate and up-to-date. An example `.all-contributorsrc` file looks like this:
```json
{
"contributors": [
{
"name": "Contributor Name 1",
"contributions": ["ideas", "docs"]
},
{
"name": "Contributor Name 2",
"contributions": ["code"]
}
]
}
```
In your `.rst` file, use the `all-contributors` directive to display the list of contributors. You can specify the relative path to the `.all-contributorsrc` file or omit it to use the default path (`.all-contributorsrc` in the source directory).
Example 1: Using the default `.all-contributorsrc` path:
```rst
.. all-contributors::
```
Example 2: Specifying a relative path to the `.all-contributorsrc` file:
```rst
.. all-contributors:: config/.all-contributorsrc
```
Build your documentation:
```bash
make html
```
The generated HTML (or other formats) will contain a list of contributors in the format:
```
- Contributor Name 1 for ideas, docs
- Contributor Name 2 for code
```