From 8a1c23ccb177038f9d8cdfcd4eeecf7cf589fc6b Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 6 Jan 2019 00:13:04 +0800 Subject: [PATCH] share --- _config.yml | 5 ++++- layout/_partial/article.ejs | 2 +- layout/_third-party/share.ejs | 26 ++++++++++++++++++++++---- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/_config.yml b/_config.yml index 7c3f444..ea1cfa1 100755 --- a/_config.yml +++ b/_config.yml @@ -26,11 +26,12 @@ services: busuanzi: true # fastclick: true # leancloud_visitors: true - recommended_posts: true # 需要安装"hexo-recommended-posts": "^1.0.3", + recommended_posts: true # 需要安装插件 hexo-recommended-posts comments: true volantis: true music: true share: true + qrcode: true # 需要安装插件 npm i -S hexo-helper-qrcode ############################### 杂项 ############################### @@ -52,6 +53,8 @@ music: links: true # layout: links 的页面是否显示 post: true # layout: post 的页面是否显示 + + # 友链页头像占位图 loading_img: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1.0/img/qq/亲亲.gif diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 85ae362..5072f9c 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -20,7 +20,7 @@ %> <%- items.join(' ') %> <% } %> - <% if (theme.services && theme.services.share == true && config.mob && config.mob.app_key && config.mob.list && (!page.meta || page.meta.share != false)) { %> + <% if (theme.services && theme.services.share == true && (config.share || config.mob) && (!page.meta || page.meta.share != false)) { %> <%- partial('../_third-party/share') %> <% } %> diff --git a/layout/_third-party/share.ejs b/layout/_third-party/share.ejs index 1d597d8..71c6730 100644 --- a/layout/_third-party/share.ejs +++ b/layout/_third-party/share.ejs @@ -1,15 +1,33 @@ -<% if (theme.services && theme.services.share == true && config.mob && config.mob.app_key && config.mob.list && page.layout == 'post' && page.share != false) { %> +<% if (theme.services && theme.services.share == true && (config.share || config.mob) && page.layout == 'post' && page.share != false) { %>