8.5 KiB
GitHub Readme Stats
在你的 README 中 获取动态生成的GitHub统计信息!
喜欢这个项目? 请考虑捐赠来帮助它完善!
特性
GitHub 统计卡片
将这复制到你的 markdown 中,就这样,非常简单!
更改 ?username=
的值为你的用户名。
[](https://github.com/anuraghazra/github-readme-stats)
Note: 排名是基于用户的统计信息计算得出的,详见 src/calculateRank.js
隐藏个人统计信息
想要隐藏某个统计信息, 你可以传递参数 ?hide=
,并将你想要隐藏的项目用数组进行传递。
选项:
&hide=["stars","prs","issues","contribs"]

显示图标
想要显示图标, 你可以传递 show_icons=true
,像这样:

自定义
你可以为你的 Stats Card
或 Repo Card
自定义样式,however you want with URL params.
自定义选项:
Option | type | description | Stats Card (default) | Repo Card (default) |
---|---|---|---|---|
title_color | hex color | title color | 2f80ed | 2f80ed |
text_color | hex color | body color | 333 | 333 |
icon_color | hex color | icon color | 4c71f2 | 586069 |
bg_color | hex color | card bg color | FFFEFE | FFFEFE |
line_height | number | control the line-height between text | 30 | N/A |
hide_rank | boolean | hides the ranking | false | N/A |
hide_title | boolean | hides the stats title | false | N/A |
hide_border | boolean | hides the stats card border | false | N/A |
show_owner | boolean | shows owner name in repo card | N/A | false |
show_icons | boolean | shows icons | false | N/A |
- 你也可以通过自定义来兼容暗黑模式

Demo
- 默认
- 隐藏某个项目
- 显示图标
- 自定义添加卡片
- 自定义仓库卡片
GitHub Extra Pins
GitHub extra pins allow you to pin more than 6 repositories in your profile using a GitHub readme profile.
Yey! You are no longer limited to 6 pinned repositories.
Usage
Copy-paste this code into your readme and change the links.
Endpoint: api/pin?username=anuraghazra&repo=github-readme-stats
[](https://github.com/anuraghazra/github-readme-stats)
Demo
Use show_owner variable to include the repo's owner username
提示 (Align The Repo Cards)
你通常无法将图片靠边显示,为此,您可以使用以下方法:
<a href="https://github.com/anuraghazra/github-readme-stats">
<img align="left" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
</a>
<a href="https://github.com/anuraghazra/convoychat">
<img align="left" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" />
</a>
自己部署
自从 GitHub 的 API 每个小时只允许 5 千的请求,我都 https://github-readme-stats.vercel.app/api
很有可能会触发限制
如果你将其托管在自己的 Vercel 服务商,那么你就不用担心任何事了。点击 deploy 按钮来开始
注意: 从 #58 开始,我们应该能够处理超过 5千 的请求,并且不会出现宕机问题 :D
Guide on setting up Vercel
- 前往 vercel.com
- 点击
Log in
- 点击
Continue with GitHub
通过 GitHub 进行登录 - 登录 GitHub 并允许访问所有存储库(如果系统提示)
- Fork 这个仓库
- 返回到你的 Vercel dashboard
- 选择
Import Project
- 选择
Import Git Repository
- 选择 root 并将所有内容保持不变,并且只需添加名为 PAT_1 的环境变量(如图所示),其中将包含一个个人访问令牌(PAT),你可以在这里轻松创建(保留默认,并且只需要命名下,名字随便)
- 点击 deploy, 这就完成了,查看你的域名就可使用 API 了!
💖 支持这个项目
我几乎将我所能的进行开源,并且我试着回复每个在使用这些项目时需要帮助的人。很明显,这需要时间,但你可以免费享受此服务。
然而, 如果你正在使用这个项目并且感觉挺开心或者只是想要支持我继续开发,这里有一些方法:
谢谢! ❤️
欢迎贡献! <3
用 ❤️ 发电,用 JavaScript 制作。