From 69b1f320a762caf772a3449988c8aa2f7f89fbad Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 24 Aug 2018 13:40:23 +0800 Subject: [PATCH] add github card --- README.md | 8 ++++++++ layout/_partial/article.ejs | 3 +++ layout/_partial/scripts.ejs | 2 ++ 3 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 506e54f..e53bd82 100755 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - 支持3种评论系统:Disqus、来必力和Valine。 - 增加了推荐文章列表,增加博客流量。 - 增加了阅读统计。 +- 文末可以显示GitHub仓库卡片。 @@ -296,6 +297,13 @@ recommended_posts: false --- ``` +显示相关GitHub仓库卡片 + +``` +--- +repo: xaoxuu/hexo-theme-material-x +--- +``` ## 主题色和其他样式 diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 4781755..50355c4 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -26,6 +26,9 @@
<%- post.content %> + <% if (post.repo) { %> +
+ <% } %>
<% if (post.tags && post.tags.length) { %> diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 5772d27..0cb1353 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -6,6 +6,8 @@ + + <%- js('js/jquery.fitvids.js') %>