在 README 中展示你在知乎,GitHub,B 站,LeetCode,掘金,CSDN,牛客等网站的数据,也可用于服务状态监控. Show your LeetCode & GitHub stats in GitHub Profile.
MIT License
✨ Show your LeetCode & GitHub stats in GitHub Profile. ✨
Currently, we support the following websites, PR is welcomed:
We support multiple themes.
Multiple themes are supported, just add &theme=<theme_name>
after the url. For example:
https://stats.justsong.cn/api/leetcode/?username=quanpeng&theme=dark
Theme list: light
、dark
、merko
、gruvbox
、gruvbox_light
、tokyonight
、onedark
...
For a complete list of themes see common/theme.js , or see theme list of github-readme-stats.
The default language is English. If you want to change it to Chinese, just add &lang=zh-CN
after the url, for example:
For the support of other languages, PR is always welcomed.
Custom website monitoring:https://stats.justsong.cn/api/website/?url=https://github.com/&style=flat&logo=github
Where style and logo are optional, for specific values please refer to shield.io .
Note that monitoring is not real-time, it is affected by the set cache time
GitHub: https://stats.justsong.cn/api/github?username=songquanpeng
Zhihu: https://stats.justsong.cn/api/zhihu?username=excited-vczh
Bilibili:https://stats.justsong.cn/api/bilibili/?id=666
LeetCode: https://stats.justsong.cn/api/leetcode/?username=quanpeng
LeetCode (China Version): https://stats.justsong.cn/api/leetcode?username=quanpeng&cn=true
Juejin: https://stats.justsong.cn/api/juejin?id=1556564194374926
CSDN: https://stats.justsong.cn/api/csdn?id=vczh
Nowcoder: https://stats.justsong.cn/api/nowcoder?id=6484283
Steam: https://stats.justsong.cn/api/steam
You can deploy through Vercel, or deploy to your own server.
When deploying, there are some environment variables that can be set, all of which are optional:
BILIBILI_SESSDATA
: Bilibili's SESSDATA
cookie.GITHUB_TOKEN
: GitHub token.STEAM_ID
: Steam personal ID, use browser to login Steam, then click personal profile, the id behind the profiles in the URL is the STEAM_IDSTEAM_API_TOKEN
: According the link to get the token,https://steamcommunity.com/dev/apikey
CACHE_TIME
: cache time, the unit is second, default value is 6000
, namely 100 minutes.MAX_CACHE_ITEMS
: maximum cache items, default value is 1024
.PORT
: service port number, default value is 3000
.Steps:
git clone https://github.com/songquanpeng/stats-cards.git
cd stats-cards
npm i
node ./app.js
# or
pm2 start ./app.js --name stats-cards
Set environment variables: ENV_NAME=value cmd
PORT=3000 node ./app.js
<img src="https://stats.justsong.cn/api/leetcode?username=username&cn=true" style="box-shadow:none !important">