봇 설정
.all-contributorsrc
JSON 파일을 업데이트하여 all-contributors bot 동작을 구성 할 수 있습니다. 기여자 목록을 생성하는 데 사용되는 데이터는 여기에 저장되며 ` @ all-contributors </ code>에서 목록을 생성하는 방법을 구성 할 수 있습니다.
CLI Configuration 과 유사한 봇 구성입니다.🤖
지정할 수있는 키는 다음과 같습니다.
옵션 | 내용 | 예제/기본값 |
---|---|---|
files` |
{
"files": ["README.md"],
"imageSize": 100,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
"types": {
"custom": {
"symbol": "🔭",
"description": "A custom contribution type.",
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
}
},
"skipCi": "true",
"contributors": []
}
Moving the All Contributors table into a different file
As you know, the default file for the contributors table is README.md
. But if your project has tons of contributors, it doesn't make sense to include the All Contributors table in the README.md
file. Instead, you can use a different file to do so.
Here are the steps that may help you in achieving that. For the sake of this tutorial, the different file that we'll use is going to be named CONTRIBUTORS.md
.
Install the bot. See the Installation page for instructions.
Add your first contributor. See the Bot Usage page for instructions.
Create the
CONTRIBUTORS.md
file.Copy the code from the Contributors section in the
README.md
file, starting at theALL-CONTRIBUTORS-LIST:START
line, and ending at theALL-CONTRIBUTORS-LIST:END
line.Example:
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center">...</td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->
Modify the
files
key in the.all-contributorsrc
JSON file to match your new file name.{ "files": [ "CONTRIBUTORS.md" ], ... }
Now you should be good to go. New contributors will be added to this new file instead of the
README.md
file.