微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在GitHub所有贡献者规范的贡献者模板中包含贡献类型徽章?

如何解决如何在GitHub所有贡献者规范的贡献者模板中包含贡献类型徽章?

all-contributors,这是Github机器人的一项服务,用于管理参与者在存储库中的信息。根据指南,仅需要激活该机器人并设置一个名为.all-contributorsrc的JSON文件即可。官方站点提供的示例文件如下。

{
  "projectName": "all-contributors-cli","projectOwner": "jfmengels","repoType": "github","repoHost": "https://github.com","files": ["README.md"],"imageSize": 100,"commit": false,"contributorsPerLine": 7,"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 %>\"),"
    }
  },"contributors": []
}

没有contributorTemplate(它是可选的)属性,它会生成如下的自述文件

without contributorTemplate

使用contributorTemplate属性,它会生成如下的自述文件

with contributorTemplate

我只需要删除姓名,并在贡献者的图像中包含贡献徽章即可。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。