From c1f375d89ca8f5b937b58bb08246db5be35d0807 Mon Sep 17 00:00:00 2001 From: MHuiG <616001163@qq.com> Date: Sun, 7 Jun 2020 10:07:06 +0800 Subject: [PATCH] minivaline2.7.0 --- _config.yml | 43 +++++++++++++++++++++- layout/_partial/article.ejs | 3 ++ layout/_partial/post/minivaline.ejs | 57 +++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 layout/_partial/post/minivaline.ejs diff --git a/_config.yml b/_config.yml index 33cd4b2..74cad3c 100644 --- a/_config.yml +++ b/_config.yml @@ -112,7 +112,7 @@ layout: article_width: 80rem sidebar_width: 8rem -# 评论:1、Valine(推荐);2、Gitalk +# 评论:1、Valine(推荐);2、Gitalk;3、MiniValine # 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine) # 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可 @@ -137,6 +137,47 @@ gitalk: owner: # GitHub ID admin: # GitHub ID +# 3、MiniValine +# See: https://github.com/MiniValine/MiniValine +minivaline: + enable: false + mode: DesertsP # DesertsP or xCss + placeholder: Write a Comment # Comment box placeholder + math: true # Support MathJax. + md: true # Support Markdown. + enableQQ: false # Enable QQ avatar API. + NoRecordIP: false # Do not record commenter IP. + visitor: true # Article reading statistics. + maxNest: 6 # Sub-comment maximum nesting depth. + pageSize: 6 # Pagination size. + adminEmailMd5: de8a7aa53d07e6b6bceb45c64027763d # The MD5 of Admin Email to show Admin Flag.[Just Only DesertsP Style mode] + tagMeta: # The String Array of Words to show Flag.[Just Only xCss Style mode] + - 管理员 + - 小伙伴 + - 访客 + master: # The MD5 String Array of master Email to show master Flag.[Just Only xCss Style mode] + - de8a7aa53d07e6b6bceb45c64027763d + friends: # The MD5 String Array of friends Email to show friends Flag.[Just Only xCss Style mode] + - b5bd5d836c7a0091aa8473e79ed4c25e + - adb7d1cd192658a55c0ad22a3309cecf + - 3ce1e6c77b4910f1871106cb30dc62b0 + - cfce8dc43725cc14ffcd9fb4892d5bfc + # MiniValine's display language depends on user's browser or system environment + # If you want everyone visiting your site to see a uniform language, you can set a force language value + # Available values: en | zh-CN | (and many more) + # More i18n info: https://github.com/MiniValine/minivaline-i18n + lang: + # Expression Url. + # https://github.com/MiniValine/MiniValine/blob/master/.github/FAQ.md#how-to-customize-emoticons + emoticonUrl: + - https://cdn.jsdelivr.net/npm/alus@latest + - https://cdn.jsdelivr.net/gh/MiniValine/qq@latest + - https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@latest + - https://cdn.jsdelivr.net/gh/MiniValine/tieba@latest + - https://cdn.jsdelivr.net/gh/MiniValine/twemoji@latest + - https://cdn.jsdelivr.net/gh/MiniValine/weibo@latest + + # GitHub Ribbons-封面右上角的forkme,换样式直接在source/images目录下替换forkme图片 github: # (关闭请设置为false) diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 5d0dfcc..c72a5fd 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -82,4 +82,7 @@ <%- partial('post/gitalk') %> <% } %> + <% if (theme.minivaline && theme.minivaline.enable && !post.no_minivaline) { %> + <%- partial('post/minivaline') %> + <% } %> \ No newline at end of file diff --git a/layout/_partial/post/minivaline.ejs b/layout/_partial/post/minivaline.ejs new file mode 100644 index 0000000..62319e3 --- /dev/null +++ b/layout/_partial/post/minivaline.ejs @@ -0,0 +1,57 @@ +<% if (!index && theme.leancloud && theme.leancloud.enable){ %> + +