我一直在使用shields.io在 README 文件中构建我的 GitHub 徽章,但仅限于许可证和版本等徽章。
现在,我的目标是根据特定存储库的观看数量构建动态徽章,只要有新人观看该存储库,该数字就会更新。
最好的方法是什么?
最佳答案
刚刚解决了问题。
对于存储库 Project-CodeIgniter-CMS
和用户 goncaloperes
,我使用了以下代码:
watch :
[![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)
fork :
[![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)
关于git - 动态徽章 GitHub,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49130448/