2

我一直在使用shields.io在 README 文件中构建我的 GitHub 徽章,但仅限于许可证和版本等徽章。

现在,我的目标是在特定 repo 的手表数量上构建动态徽章,以便在新人观看 repo 时数字更新。

最好的方法是什么?

4

2 回答 2

4

刚刚解决了问题。

对于repo Project-CodeIgniter-CMSuser goncaloperes,我使用了以下代码:

手表:

[![GitHub Watches](https://img.shields.io/github/watchers/goncaloperes/Project-CodeIgniter-CMS.svg?style=social&label=Watch&maxAge=2592000)](https://github.com/goncaloperes/Project-CodeIgniter-CMS/watchers)

开始:

[![GitHub Starts](https://img.shields.io/github/stars/goncaloperes/Project-CodeIgniter-CMS.svg?style=social&label=Star&maxAge=2592000)](https://github.com/goncaloperes/Project-CodeIgniter-CMS/stargazers)

叉子:

[![GitHub Forks](https://img.shields.io/github/forks/goncaloperes/Project-CodeIgniter-CMS.svg?style=social&label=Fork&maxAge=2592000)](https://github.com/goncaloperes/Project-CodeIgniter-CMS/network)
于 2018-03-07T11:22:42.793 回答
0

Shields.io 也支持观察者作为徽章类型

![GitHub watchers](https://img.shields.io/github/watchers/badges/shields.svg?style=social&logo=github&label=Watch)
于 2018-03-06T12:09:46.407 回答