mdBook
mdBook copied to clipboard
Add the names of all contributors to the documentation
Problem
There are only a few names mentioned on the contributor's page while there are 265 contributors.
Proposed Solution
So, adding the names of all the contributors would be better and I would like to take on this task and would love to contribute.
Notes
No response
I would love to take on this task and would love to contribute.
Hi!
I just came across this issue and your PR #2072. I think you could use mdbook-cmdrun for this. I checked the GitHub api, you can curl
the list of contributors here https://api.github.com/repos/rust-lang/mdBook/contributors
.
To display the name of each contributor if it is listed on GitHub, you can also curl
the name using https://api.github.com/users/:user_name
. When it is defined like ehuss, the name is not null, otherwise like mdinger, the name is null.
Some quick commands:
curl https://api.github.com/repos/rust-lang/mdBook/contributors
curl https://api.github.com/users/ehuss
curl https://api.github.com/users/mdinger
I see multiple drawbacks from this approach:
- Apparently the github api is not processing results but are caching them, so the list may be inaccurate link
- Using an external script and fetching all contributors information could be long, especially when someone is working on the book, this could be solved by caching the results locally (in /tmp for example).
- The
book
artifact won't be deterministic anymore
https://api.github.com/repos/rust-lang/mdBook/contributors only returns 30 contributors for me.
According to the documentation link, only the first 100 contributors that has contributed on default branch (I guess Master) are present. This is a good filter though.
All contributors have been logged by git, and I think it's sufficient to list only the main contributors on the documentation. You can get all contributors by using git shortlog -sne
in the git repository, refer to https://git-scm.com/docs/git-shortlog