在Readme Mark Down中添加GitHub下载计数徽章

22
2个回答

37

你必须将它作为图片插入到你的README中。如果你的README是markdown(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中。

2
我的GitHub项目的下载次数是如何计算的? - joesan
1
我确实将它添加到了我的README文件中,但它显示的总下载量为755k,这并不适用于我的项目! - joesan
6
好的,我会尽力进行翻译。以下是需要翻译的内容:oh, sorry, you have to replace atom/atom with your username/project_name - Dmitriy Budnik
4
你好 @DmitriyBudnik,我的徽章显示零次下载,尽管有人已经下载了它。你知道为什么吗? - rafa.pereira
6
这取决于您分发软件的方式。我猜只有捆绑发布,比如.zip文件的下载才算数。请参考shields.io网页:https://shields.io/category/downloads了解详情。 - Dmitriy Budnik

4

1
链接已损坏。 - josephjacobmorris

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接