21

我想添加一个徽章,用于计算我在 GitHub 上的一个项目的下载总数。我遇到了这个包含所有图像屏蔽的页面

https://shields.io/

![Github 发布](https://img.shields.io/github/downloads/atom/atom/latest/total.svg?style=plastic)

关于如何将其添加到我在 GitHub 中的项目的任何想法?

4

2 回答 2

31

您必须将其作为图像插入到您的README. 如果你README的降价(README.md)应该是这样的:

句法:

[![Github All Releases](https://img.shields.io/github/downloads/<-- User Name-->/<-- Your Repo Name-->/total.svg)]()

 例子

[![Github All Releases](https://img.shields.io/github/downloads/atom/atom/total.svg)]()

如果您单击 shields.io 上的徽章,您可以复制粘贴您需要插入的 markdown 语法README.md

于 2017-08-14T11:53:42.817 回答
4

查看PePy以获取存储库的下载计数和徽章的代码。这是一个例子:

http://pepy.tech/count/video2tfrecord

于 2018-04-26T14:36:36.153 回答