推荐一个展示示repo的hexo插件

在博客展示github repo几乎是一个刚需。
在使用Typecho的时候我就曾做了个小插件来自娱自乐。

现在换到hexo平台,发现早有前人造好了轮子。

使用方法

{% githubCard user:your_user [repo:your_repo] [width:400] [height:200] [theme:default] [client_id:your_client_id] [client_secret:your_client_secret] [align:text-align_position] %}
ArgumentDescription
userGitHub user name
repo(Optional) GitHub repository name of the user. If omit then display only the user profile
height(Optional) Widget’s height (in ‘px’). Default is 200.
width(Optional) Widget’s width (in ‘px’). Default is 400.
client_id(Optional) Your GitHub app client_id
client_secret(Optional) Your GitHub app client_secret
align(Optional) What kind of text-align is you want. Default is center.

替换CDN

修改/node_modules/hexo-github-card/index.html,将第13行改为:

<script src="//cdn.jsdelivr.net/github-cards/latest/widget.js"></script>

效果展示


推荐一个展示示repo的hexo插件
https://blog.loststar.tech/posts/7a64e458/
作者
Loststar
发布于
2018年1月7日
许可协议