【问题标题】:Dynamic Badges GitHub动态徽章 GitHub
【发布时间】:2018-08-14 06:54:53
【问题描述】:

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

现在,我的目标是在特定 repo 的观看次数上构建动态徽章,这样每当有新人观看 repo 时,数字就会更新。

最好的方法是什么?

【问题讨论】:

    标签: git github badge readme shields.io


    【解决方案1】:

    刚刚解决了问题。

    对于 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)
    

    【讨论】:

      【解决方案2】:

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

      ![GitHub watchers](https://img.shields.io/github/watchers/badges/shields.svg?style=social&logo=github&label=Watch)
      

      【讨论】:

        猜你喜欢
        • 2022-07-01
        • 2021-11-08
        • 2019-04-22
        • 2016-04-01
        • 2022-06-14
        • 2021-09-17
        • 2017-01-25
        • 2020-01-03
        • 1970-01-01
        相关资源
        最近更新 更多