diff --git a/_config.yml b/_config.yml index 23fed42..0ca59a0 100755 --- a/_config.yml +++ b/_config.yml @@ -11,16 +11,12 @@ style: pure # pure: 导航栏和标题栏背景是白色 ############################### 服务开关 ############################### -# 服务开关,如果你想禁用某些功能,直接设置为false或者注释掉,相关的js脚本就不会加载。 -# 有些服务这里打开了也未必会生效,还需要额外的配置,详见文档。 services: # cdn: true scrollreveal: true nodewaves: true busuanzi: true # fastclick: true - comments: true - volantis: true # music: true # share: true @@ -192,6 +188,7 @@ share: # valine valine: enable: true # 如果你想用Valine评论系统,请设置enable为true + volantis: true # 是否启用volantis版本(禁止匿名,增加若干贴吧、QQ表情) # 还需要在根目录配置文件中添加下面这三行内容 # leancloud: # app_id: 你的appId diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 8c5b649..a946488 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -25,7 +25,7 @@ %> <%- items.join(' ') %> <% } %> - <% if (theme.services && theme.services.share == true && theme.share && (!page.meta || page.meta.share != false)) { %> + <% if (theme.services.share == true && theme.share && (!page.meta || page.meta.share != false)) { %> <%- partial('../_third-party/share') %> <% } %> diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index a9f7920..6a95400 100755 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -16,7 +16,7 @@ <%}%>
<%- markdown(__('footer.license')) %>
-
<%- __('footer.use') %> Material X <%- __('footer.theme') %><% if (theme.services && theme.services.busuanzi == true) { %><%- __('symbol.comma') %><%- __('footer.total_views') %> <%- __('footer.times') %><% } %><%- __('symbol.period') %> +
<%- __('footer.use') %> Material X <%- __('footer.theme') %><% if (theme.services.busuanzi == true) { %><%- __('symbol.comma') %><%- __('footer.total_views') %> <%- __('footer.times') %><% } %><%- __('symbol.period') %>
diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index a9956de..2e354fc 100755 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -46,7 +46,7 @@ - <% if (theme.services && theme.services.nodewaves == true) { %> + <% if (theme.services.nodewaves == true) { %> <% } %> diff --git a/layout/_partial/meta.ejs b/layout/_partial/meta.ejs index 6b0ac7a..34f5a2b 100644 --- a/layout/_partial/meta.ejs +++ b/layout/_partial/meta.ejs @@ -67,7 +67,7 @@
<% } %> <% } %> - <% if(!isPostList && theme.services && (!post.meta || post.meta.counter != false)){ %> + <% if(!isPostList && (!post.meta || post.meta.counter != false)){ %> <% if (theme.services.busuanzi == true) { %>
diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index b5b1a1a..856bf02 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -63,7 +63,7 @@ var enableDisqus = false; var enableLivere = false; var enableValine = false; - if (page && theme.services && theme.services.comments == true && page.comments != false) { + if (page && page.comments != false) { if (config.disqus_shortname) { enableDisqus = true; } @@ -104,8 +104,8 @@ <% } %> <% if (enableValine){ %> - <% if (theme.services.volantis == true) { %> - <% if (theme.services && theme.services.cdn == true) { %> + <% if (theme.valine.volantis == true) { %> + <% if (theme.services.cdn == true) { %> <% } else { %> <%- js('js/volantis.js') %> diff --git a/layout/_third-party/aplayer.ejs b/layout/_third-party/aplayer.ejs index e64bb63..56238e6 100644 --- a/layout/_third-party/aplayer.ejs +++ b/layout/_third-party/aplayer.ejs @@ -1,4 +1,4 @@ -<% if (theme.services && theme.services.music == true) { %> +<% if (theme.services.music == true) { %>
+<% if (theme.services.share == true && theme.share && page.layout == 'post' && page.share != false) { %>