|
| 1 | +<p align="center"> |
| 2 | + <img width="100px" src="https://res.cloudinary.com/anuraghazra/image/upload/v1594908242/logo_ccswme.svg" align="center" alt="Github Readme Stats" /> |
| 3 | + <h2 align="center">GitHub Readme Stats</h2> |
| 4 | + <p align="center">在你的 README 中 获取动态生成的GitHub统计信息!</p> |
| 5 | +</p> |
| 6 | + |
| 7 | + <p align="center"> |
| 8 | + <a href="https://github.com/anuraghazra/github-readme-stats/actions"> |
| 9 | + <img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" /> |
| 10 | + </a> |
| 11 | + <a href="https://github.com/anuraghazra/github-readme-stats/issues"> |
| 12 | + <img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" /> |
| 13 | + </a> |
| 14 | + <a href="https://github.com/anuraghazra/github-readme-stats/pulls"> |
| 15 | + <img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" /> |
| 16 | + </a> |
| 17 | + </p> |
| 18 | + |
| 19 | + <p align="center"> |
| 20 | + <a href="#demo">查看 Demo</a> |
| 21 | + · |
| 22 | + <a href="https://github.com/anuraghazra/github-readme-stats/issues">报告 bug</a> |
| 23 | + · |
| 24 | + <a href="https://github.com/anuraghazra/github-readme-stats/issues">请求增加功能</a> |
| 25 | + </p> |
| 26 | +</p> |
| 27 | +<p align="center">喜欢这个项目? 请考虑<a href="https://www.paypal.me/anuraghazra">捐赠</a>来帮助它完善! |
| 28 | + |
| 29 | +# 特性 |
| 30 | + |
| 31 | +- [GitHub 统计卡片](#GitHub-统计卡片) |
| 32 | +- [GitHub Extra Pins](#github-extra-pins) |
| 33 | +- [自定义](#自定义) |
| 34 | +- [自己部署](#自己部署) |
| 35 | + |
| 36 | +# GitHub 统计卡片 |
| 37 | + |
| 38 | +将这复制到你的 markdown 中,就这样,非常简单! |
| 39 | +更改 `?username=` 的值为你的用户名。 |
| 40 | + |
| 41 | +```md |
| 42 | +[](https://github.com/anuraghazra/github-readme-stats) |
| 43 | +``` |
| 44 | + |
| 45 | +_Note: 排名是基于用户的统计信息计算得出的,详见 [src/calculateRank.js](./src/calculateRank.js)_ |
| 46 | + |
| 47 | +### 隐藏个人统计信息 |
| 48 | + |
| 49 | +想要隐藏某个统计信息, 你可以传递参数 `?hide=`,并将你想要隐藏的项目用数组进行传递。 |
| 50 | + |
| 51 | +> 选项: `&hide=["stars","prs","issues","contribs"]` |
| 52 | +
|
| 53 | +```md |
| 54 | + |
| 55 | +``` |
| 56 | + |
| 57 | +### 显示图标 |
| 58 | + |
| 59 | +想要显示图标, 你可以传递 `show_icons=true`,像这样: |
| 60 | + |
| 61 | +```md |
| 62 | + |
| 63 | +``` |
| 64 | + |
| 65 | +### 自定义 |
| 66 | + |
| 67 | +你可以为你的 `Stats Card` 或 `Repo Card` 自定义样式,however you want with URL params. |
| 68 | + |
| 69 | +自定义选项: |
| 70 | + |
| 71 | +| Option | type | description | Stats Card (default) | Repo Card (default) | |
| 72 | +| ----------- | --------- | ------------------------------------ | -------------------- | ------------------- | |
| 73 | +| title_color | hex color | title color | 2f80ed | 2f80ed | |
| 74 | +| text_color | hex color | body color | 333 | 333 | |
| 75 | +| icon_color | hex color | icon color | 4c71f2 | 586069 | |
| 76 | +| bg_color | hex color | card bg color | FFFEFE | FFFEFE | |
| 77 | +| line_height | number | control the line-height between text | 30 | N/A | |
| 78 | +| hide_rank | boolean | hides the ranking | false | N/A | |
| 79 | +| hide_title | boolean | hides the stats title | false | N/A | |
| 80 | +| hide_border | boolean | hides the stats card border | false | N/A | |
| 81 | +| show_owner | boolean | shows owner name in repo card | N/A | false | |
| 82 | +| show_icons | boolean | shows icons | false | N/A | |
| 83 | + |
| 84 | +- 你也可以通过自定义来兼容暗黑模式 |
| 85 | + |
| 86 | +```md |
| 87 | + |
| 88 | +``` |
| 89 | + |
| 90 | +### Demo |
| 91 | + |
| 92 | +- 默认 |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | +- 隐藏某个项目 |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +- 显示图标 |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | +- 自定义添加卡片 |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +- 自定义仓库卡片 |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +# GitHub Extra Pins |
| 113 | + |
| 114 | +GitHub extra pins allow you to pin more than 6 repositories in your profile using a GitHub readme profile. |
| 115 | + |
| 116 | +Yey! You are no longer limited to 6 pinned repositories. |
| 117 | + |
| 118 | +### Usage |
| 119 | + |
| 120 | +Copy-paste this code into your readme and change the links. |
| 121 | + |
| 122 | +Endpoint: `api/pin?username=anuraghazra&repo=github-readme-stats` |
| 123 | + |
| 124 | +```md |
| 125 | +[](https://github.com/anuraghazra/github-readme-stats) |
| 126 | +``` |
| 127 | + |
| 128 | +### Demo |
| 129 | + |
| 130 | +[](https://github.com/anuraghazra/github-readme-stats) |
| 131 | + |
| 132 | +Use [show_owner](#自定义) variable to include the repo's owner username |
| 133 | + |
| 134 | +[](https://github.com/anuraghazra/github-readme-stats) |
| 135 | + |
| 136 | +### 提示 (Align The Repo Cards) |
| 137 | + |
| 138 | +你通常无法将图片靠边显示,为此,您可以使用以下方法: |
| 139 | + |
| 140 | +```md |
| 141 | +<a href="https://github.com/anuraghazra/github-readme-stats"> |
| 142 | + <img align="left" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" /> |
| 143 | +</a> |
| 144 | +<a href="https://github.com/anuraghazra/convoychat"> |
| 145 | + <img align="left" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=convoychat" /> |
| 146 | +</a> |
| 147 | +``` |
| 148 | + |
| 149 | +## 自己部署 |
| 150 | + |
| 151 | +自从 GitHub 的 API 每个小时只允许 5 千的请求,我都 `https://github-readme-stats.vercel.app/api` 很有可能会触发限制 |
| 152 | +如果你将其托管在自己的 Vercel 服务商,那么你就不用担心任何事了。点击 deploy 按钮来开始 |
| 153 | + |
| 154 | +注意: 从 [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) 开始,我们应该能够处理超过 5千 的请求,并且不会出现宕机问题 :D |
| 155 | + |
| 156 | +[](https://vercel.com/import/project?template=https://github.com/anuraghazra/github-readme-stats) |
| 157 | + |
| 158 | +<details> |
| 159 | + <summary>Guide on setting up Vercel</summary> |
| 160 | + |
| 161 | +1. 前往 [vercel.com](https://vercel.com/) |
| 162 | +1. 点击 `Log in` |
| 163 | +  |
| 164 | +1. 点击 `Continue with GitHub` 通过 GitHub 进行登录 |
| 165 | +  |
| 166 | +1. 登录 GitHub 并允许访问所有存储库(如果系统提示) |
| 167 | +1. Fork 这个仓库 |
| 168 | +1. 返回到你的 [Vercel dashboard](https://vercel.com/dashboard) |
| 169 | +1. 选择 `Import Project` |
| 170 | +  |
| 171 | +1. 选择 `Import Git Repository` |
| 172 | +  |
| 173 | +1. 选择 root 并将所有内容保持不变,并且只需添加名为 PAT_1 的环境变量(如图所示),其中将包含一个个人访问令牌(PAT),你可以在[这里](https://github.com/settings/tokens/new)轻松创建(保留默认,并且只需要命名下,名字随便) |
| 174 | +  |
| 175 | +1. 点击 deploy, 这就完成了,查看你的域名就可使用 API 了! |
| 176 | +</details> |
| 177 | + |
| 178 | +## :sparkling_heart: 支持这个项目 |
| 179 | + |
| 180 | +我几乎将我所能的进行开源,并且我试着回复每个在使用这些项目时需要帮助的人。很明显,这需要时间,但你可以免费享受此服务。 |
| 181 | + |
| 182 | +然而, 如果你正在使用这个项目并且感觉挺开心或者只是想要支持我继续开发,这里有一些方法: |
| 183 | + |
| 184 | +- 在你的 README 中使用 github-readme-stats 时,链接指向会这里 :D |
| 185 | +- Star 并 分享这个项目 :rocket: |
| 186 | +- [](https://www.paypal.me/anuraghazra) - 你可以通过 PayPal 一次性捐款. 我可能会买一杯~~咖啡~~茶. :tea: |
| 187 | + |
| 188 | +谢谢! :heart: |
| 189 | + |
| 190 | +--- |
| 191 | + |
| 192 | +欢迎贡献! <3 |
| 193 | + |
| 194 | +用 :heart: 发电,用 JavaScript 制作。 |
0 commit comments