diff --git a/_config.yml b/_config.yml index 4358c6d..4b507b2 100755 --- a/_config.yml +++ b/_config.yml @@ -4,10 +4,10 @@ info: docs: https://xaoxuu.com/wiki/material-x/ cdn: # 把对应的那一行注释掉就使用本地的文件 css: - style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.18/css/style.css + style: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.19/css/style.css js: - app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.18/js/app.js - search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.18/js/search.js + app: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.19/js/app.js + search: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-material-x@19.4.19/js/search.js volantis: https://cdn.jsdelivr.net/gh/xaoxuu/volantis@1/js/volantis.min.js @@ -44,6 +44,16 @@ avatar_placeholder: https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avat date_format: 'YYYY-MM-DD' # 文章发布日期的格式 updated_date_format: 'll' # 文章更新日期的格式 +# 幻灯片 +# backstretch: +# position: cover # cover: 封面背景 full: 整个网页背景 +# duration: 6000 # 持续时间(毫秒) +# fade: 1500 # 渐变(毫秒) +# images: +# - https://img.vim-cn.com/f6/78aed21213230b9220f310f9ea6c822b011846.jpg +# - https://img.vim-cn.com/d5/b004c81a13aea401375d03b1258ecadbfcbaa7.jpg +# - https://img.vim-cn.com/4c/8e7294998989454b2dcd2624373d5a699c4414.jpg + ############################### 自定义 ############################### # page的封面 @@ -217,6 +227,19 @@ share: # footer: '页脚文字,支持[markdown](/)' +############################### 评论系统 ############################### +# disqus_shortname: 要使用哪个请复制到根目录配置文件! +# livere_uid: 要使用哪个请复制到根目录配置文件! +# gitalk: 要使用哪个请复制到根目录配置文件! +# clientID: 你的clientID +# clientSecret: 你的clientSecret +# repo: 你的repo名 +# owner: 你的GitHub名 +# admin: [] 至少填写你的GitHub名 +# leancloud: 要使用哪个请复制到根目录配置文件! +# app_id: 你的appId +# app_key: 你的appKey + ############################### 杂项,请勿删除 ############################### #valine配置 diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index e232ab8..ae9ed3d 100755 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -81,6 +81,12 @@ <% } %> <% }) %> +<% + if (sections.indexOf('comments') < 0) { + page.comments = false; + } +%> + <% if (page.mathjax){ %> <%- partial('mathjax') %> diff --git a/layout/_partial/cover.ejs b/layout/_partial/cover.ejs index b457da6..c6c84f4 100644 --- a/layout/_partial/cover.ejs +++ b/layout/_partial/cover.ejs @@ -1,31 +1,10 @@ -<% -var showCover = false; -if (theme.cover) { - // 如果页面的Front-matter声明了cover,就取页面的值 - if (page.cover != undefined) { - showCover = page.cover; - } else { - // 否则,如果是首页,只有首页的第一页显示 - if (is_home()) { - if (page.prev) { - showCover = false; - } else { - showCover = true; - } - } else { - showCover = true; - } - } -} -%> - <% if (showCover == true) { %>