From 47d33f0b13ba1204fbbb13d575906e0b0625d131 Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Thu, 26 Nov 2020 15:09:33 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E9=97=ADvaline?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=8C=BA=E7=9A=84front-matter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在文章头添加`comment: false`可以关闭单篇文章的valine评论区。 --- layout/_partial/post/valine.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/post/valine.ejs b/layout/_partial/post/valine.ejs index 39c9a97..d4fa6c4 100644 --- a/layout/_partial/post/valine.ejs +++ b/layout/_partial/post/valine.ejs @@ -1,4 +1,4 @@ -<% if (!index && theme.leancloud && theme.leancloud.enable){ %> +<% if (!index && theme.leancloud && theme.leancloud.enable && post.comment!=false){ %>
From b1def3644547b6710ab445418fb6f678937cea5f Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Thu, 26 Nov 2020 15:12:08 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E9=97=ADgitalk?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=8C=BA=E7=9A=84front-matter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在文章头添加`comment: false`可以关闭单篇文章的gitalk评论区。 --- layout/_partial/post/gitalk.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/_partial/post/gitalk.ejs b/layout/_partial/post/gitalk.ejs index d2289dd..d09e711 100644 --- a/layout/_partial/post/gitalk.ejs +++ b/layout/_partial/post/gitalk.ejs @@ -1,4 +1,4 @@ -<% if (theme.gitalk.enable) { %> +<% if (theme.gitalk.enable && post.comment!=false) { %>
<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.css') %> <%- js('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.min.js') %> @@ -18,4 +18,4 @@ gitalk.render('gitalk-container') -<% } %> \ No newline at end of file +<% } %> From af0bc340766405b17ec58dacd2dbc42b33859060 Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Fri, 27 Nov 2020 15:36:02 +0800 Subject: [PATCH 3/8] Update minivaline.ejs --- layout/_partial/post/minivaline.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/post/minivaline.ejs b/layout/_partial/post/minivaline.ejs index 91aa117..c6ad4a7 100644 --- a/layout/_partial/post/minivaline.ejs +++ b/layout/_partial/post/minivaline.ejs @@ -1,4 +1,4 @@ -<% if (!index && theme.leancloud && theme.leancloud.enable){ %> +<% if (!index && theme.leancloud && theme.leancloud.enable && post.comment!=false){ %>
From def86097678e94b6af7c5cb83782d1fc81c94553 Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Fri, 27 Nov 2020 15:50:58 +0800 Subject: [PATCH 4/8] Update gitalk.ejs --- layout/_partial/post/gitalk.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/post/gitalk.ejs b/layout/_partial/post/gitalk.ejs index d09e711..873cb13 100644 --- a/layout/_partial/post/gitalk.ejs +++ b/layout/_partial/post/gitalk.ejs @@ -1,4 +1,4 @@ -<% if (theme.gitalk.enable && post.comment!=false) { %> +<% if (theme.gitalk.enable && post.comments) { %>
<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.css') %> <%- js('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.min.js') %> From cd6c3c6e285f1cd68933f97a51782cbfc3f70c12 Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Fri, 27 Nov 2020 15:51:40 +0800 Subject: [PATCH 5/8] Update minivaline.ejs --- layout/_partial/post/minivaline.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/post/minivaline.ejs b/layout/_partial/post/minivaline.ejs index c6ad4a7..227a3a2 100644 --- a/layout/_partial/post/minivaline.ejs +++ b/layout/_partial/post/minivaline.ejs @@ -1,4 +1,4 @@ -<% if (!index && theme.leancloud && theme.leancloud.enable && post.comment!=false){ %> +<% if (!index && theme.leancloud && theme.leancloud.enable && post.comments){ %>
From 567584695c6cd9bc6f9b5a031b38a833e0752957 Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Fri, 27 Nov 2020 15:52:22 +0800 Subject: [PATCH 6/8] Update valine.ejs --- layout/_partial/post/valine.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/post/valine.ejs b/layout/_partial/post/valine.ejs index d4fa6c4..3ef4038 100644 --- a/layout/_partial/post/valine.ejs +++ b/layout/_partial/post/valine.ejs @@ -1,4 +1,4 @@ -<% if (!index && theme.leancloud && theme.leancloud.enable && post.comment!=false){ %> +<% if (!index && theme.leancloud && theme.leancloud.enable && post.comments){ %>
From 8aaa2094c40aaa797188b5a4c3128040a902e88b Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Fri, 27 Nov 2020 15:57:01 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=20=F0=9F=93=9D=20docs:=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 74f5a19..f5f4d53 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,7 @@ layout: sidebar_width: 8rem # Comment:1、Valine (recommended);2、Gitalk +# You can close the comment section of one of your posts by stating `comments: false` in front-matter. # 1、Valine [A fast, simple & powerful comment system](https://github.com/xCss/Valine) # You need create leancloud account first (https://console.leancloud.app), then put the id|key in below. @@ -426,4 +427,4 @@ The basic idea is, whenever using a project using SATA license, people shall sta ## Stargazers over time -[![Stargazers over time](https://starchart.cc/Shen-Yu/hexo-theme-ayer.svg)](https://starchart.cc/Shen-Yu/hexo-theme-ayer) \ No newline at end of file +[![Stargazers over time](https://starchart.cc/Shen-Yu/hexo-theme-ayer.svg)](https://starchart.cc/Shen-Yu/hexo-theme-ayer) From 16ce821f1ff644ec22cf4bdbc340685f2e035015 Mon Sep 17 00:00:00 2001 From: hankzhangcn <45102094+hankzhangcn@users.noreply.github.com> Date: Fri, 27 Nov 2020 16:05:49 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=9D=20docs:=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5f4d53..816173d 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ layout: sidebar_width: 8rem # Comment:1、Valine (recommended);2、Gitalk -# You can close the comment section of one of your posts by stating `comments: false` in front-matter. +# You can close the comment section on one of your posts by marking `comments: false` in front-matter. # 1、Valine [A fast, simple & powerful comment system](https://github.com/xCss/Valine) # You need create leancloud account first (https://console.leancloud.app), then put the id|key in below.