11 - fluid添加github chart
本文最后更新于:3 个月前
参考文章:
https://www.zywvvd.com/notes/hexo/theme/fluid/fluid-github-chart/fluid-github-chart/
1 - 什么是github chart?
github chart是在github中用于显示提交频次的绿色日历。
我们可以通过Github API提取数据生成图标,但是已经有前辈做了相关的开源方法。
2 - ghchart
- 2016rshah 大佬提供了现成的 API 可以直接生成贡献图表
- 官网地址:https://ghchart.rshah.org/
- 源码在 Github 上开源,仓库地址:https://github.com/2016rshah/githubchart-api
3 - 使用方法
访问链接:https://ghchart.rshah.org/<github-user-name>
即可获取指定用户的贡献图表,因为信息都是公开的,所以谁都可以直接拿到

还可以选择一个颜色作为主题颜色,比如浅蓝 26a397

4 - 添加到 Fluid 主题博客中
- 比如我想将 Github Chart 添加到
归档页
中 - 那么就需要修改
fluid\layout\archive.ejs
文件,添加如下代码
1 |
|
11 - fluid添加github chart
https://alec-97.github.io/posts/4079693730/