add github card

i18n
xaoxuu 6 years ago
parent 201a1721a5
commit 69b1f320a7
  1. 8
      README.md
  2. 3
      layout/_partial/article.ejs
  3. 2
      layout/_partial/scripts.ejs

@ -13,6 +13,7 @@
- 支持3种评论系统:Disqus、来必力和Valine。
- 增加了推荐文章列表,增加博客流量。
- 增加了阅读统计。
- 文末可以显示GitHub仓库卡片。
@ -296,6 +297,13 @@ recommended_posts: false
---
```
显示相关GitHub仓库卡片
```
---
repo: xaoxuu/hexo-theme-material-x
---
```
## 主题色和其他样式

@ -26,6 +26,9 @@
<div class="article-entry" itemprop="articleBody">
<%- post.content %>
<% if (post.repo) { %>
<div class="github-card" data-github="<%= post.repo %>"></div>
<% } %>
</div>
<% if (post.tags && post.tags.length) { %>

@ -6,6 +6,8 @@
<!-- 推荐文章 -->
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<!-- github-cards -->
<script src="//cdn.jsdelivr.net/github-cards/latest/widget.js"></script>
<%- js('js/jquery.fitvids.js') %>
<script>
var GOOGLE_CUSTOM_SEARCH_API_KEY = "<%- theme.nav_search.google_api_key %>";

Loading…
Cancel
Save