diff --git a/README.md b/README.md index 2bfd2ba..a613b96 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,10 @@ alipay: /images/alipay.jpg # qrcode image path weixin: /images/wechat.jpg +# Copyright +# type:0-close all; 1-only display in article which you have configured copyright: true; 2-all articles +copyright_type: 2 + # Search search: true diff --git a/_config.yml b/_config.yml index 649639c..6dca455 100644 --- a/_config.yml +++ b/_config.yml @@ -77,6 +77,10 @@ alipay: /images/alipay.jpg # 微信二维码图片地址 weixin: /images/wechat.jpg +# 版权声明 +# 版权声明type设定:0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性,才有版权声明; 2-所有文章均有版权声明 +copyright_type: 2 + # 是否启用搜索 search: true @@ -110,7 +114,7 @@ gitalk: # GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/) github: # (关闭请设置为false) - url: https://github.com/Shen-Yu/hexo-theme-ayer + url: false # fancybox(仅用于相册展示,若需要可配置albums) fancybox: true diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 411bc5a..770a4db 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -33,18 +33,32 @@ <% } else { %> <%- post.content %> <% } %> - + <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %>
打赏
<% } %> + + <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %> +
+ +
+ <% } %> diff --git a/layout/_partial/post/share.ejs b/layout/_partial/post/share.ejs index 415996f..569dcd7 100644 --- a/layout/_partial/post/share.ejs +++ b/layout/_partial/post/share.ejs @@ -8,6 +8,7 @@ <%- theme.share_text %>
+
<% if( theme.share_china ){ %>