From 290b38a13b22b49360406d1a4bc4bf081cbde12b Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 31 May 2024 15:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E7=AB=A0=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E8=AF=84=E8=AE=BA=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Comment.js | 157 +++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 77 deletions(-) diff --git a/components/Comment.js b/components/Comment.js index a2b73c05..fce7078d 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -121,84 +121,87 @@ const Comment = ({ frontMatter, className }) => { return null } - if (frontMatter?.comment !== 'Hide') { - return ( -
- {/* 延迟加载评论区 */} - {!shouldLoad && ( -
- Loading... - -
- )} - - {shouldLoad && ( - - {COMMENT_ARTALK_SERVER && ( -
- -
- )} - - {COMMENT_TWIKOO_ENV_ID && ( -
- -
- )} - - {COMMENT_WALINE_SERVER_URL && ( -
- -
- )} - - {COMMENT_VALINE_APP_ID && ( -
- -
- )} - - {COMMENT_GISCUS_REPO && ( -
- -
- )} - - {COMMENT_CUSDIS_APP_ID && ( -
- -
- )} - - {COMMENT_UTTERRANCES_REPO && ( -
- -
- )} - - {COMMENT_GITALK_CLIENT_ID && ( -
- -
- )} - - {COMMENT_WEBMENTION_ENABLE && ( -
- -
- )} -
- )} -
- ) + // 特定文章关闭评论区 + if (frontMatter?.comment === 'Hide') { + return null } + + return ( +
+ {/* 延迟加载评论区 */} + {!shouldLoad && ( +
+ Loading... + +
+ )} + + {shouldLoad && ( + + {COMMENT_ARTALK_SERVER && ( +
+ +
+ )} + + {COMMENT_TWIKOO_ENV_ID && ( +
+ +
+ )} + + {COMMENT_WALINE_SERVER_URL && ( +
+ +
+ )} + + {COMMENT_VALINE_APP_ID && ( +
+ +
+ )} + + {COMMENT_GISCUS_REPO && ( +
+ +
+ )} + + {COMMENT_CUSDIS_APP_ID && ( +
+ +
+ )} + + {COMMENT_UTTERRANCES_REPO && ( +
+ +
+ )} + + {COMMENT_GITALK_CLIENT_ID && ( +
+ +
+ )} + + {COMMENT_WEBMENTION_ENABLE && ( +
+ +
+ )} +
+ )} +
+ ) } export default Comment