diff --git a/components/Comment.js b/components/Comment.js index ba0d4256..bc702c4d 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -121,82 +121,84 @@ const Comment = ({ frontMatter, className }) => { return null } - return ( -
- {/* 延迟加载评论区 */} - {!shouldLoad && ( -
- Loading... - -
- )} + if (frontMatter?.comment != 'Hide') { + return ( +
+ {/* 延迟加载评论区 */} + {!shouldLoad && ( +
+ Loading... + +
+ )} - {shouldLoad && ( - - {COMMENT_ARTALK_SERVER && ( -
- -
- )} + {shouldLoad && ( + + {COMMENT_ARTALK_SERVER && ( +
+ +
+ )} - {COMMENT_TWIKOO_ENV_ID && ( -
- -
- )} + {COMMENT_TWIKOO_ENV_ID && ( +
+ +
+ )} - {COMMENT_WALINE_SERVER_URL && ( -
- -
- )} + {COMMENT_WALINE_SERVER_URL && ( +
+ +
+ )} - {COMMENT_VALINE_APP_ID && ( -
- -
- )} + {COMMENT_VALINE_APP_ID && ( +
+ +
+ )} - {COMMENT_GISCUS_REPO && ( -
- -
- )} + {COMMENT_GISCUS_REPO && ( +
+ +
+ )} - {COMMENT_CUSDIS_APP_ID && ( -
- -
- )} + {COMMENT_CUSDIS_APP_ID && ( +
+ +
+ )} - {COMMENT_UTTERRANCES_REPO && ( -
- -
- )} + {COMMENT_UTTERRANCES_REPO && ( +
+ +
+ )} - {COMMENT_GITALK_CLIENT_ID && ( -
- -
- )} + {COMMENT_GITALK_CLIENT_ID && ( +
+ +
+ )} - {COMMENT_WEBMENTION_ENABLE && ( -
- -
- )} -
- )} -
- ) + {COMMENT_WEBMENTION_ENABLE && ( +
+ +
+ )} + + )} +
+ ) + } } export default Comment diff --git a/lib/notion/getPageProperties.js b/lib/notion/getPageProperties.js index 38eede18..17f88e4e 100644 --- a/lib/notion/getPageProperties.js +++ b/lib/notion/getPageProperties.js @@ -94,6 +94,7 @@ export default async function getPageProperties( properties.type = properties.type?.[0] || '' properties.status = properties.status?.[0] || '' properties.category = properties.category?.[0] || '' + properties.comment = properties.comment?.[0] || '' // 映射值:用户个性化type和status字段的下拉框选项,在此映射回代码的英文标识 mapProperties(properties)