From 111b71a13f82c35579b7c30bfd927a66ee8fb116 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 12 Jan 2022 17:45:28 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E6=B5=8B=E8=AF=95gittalk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 6 +++--- components/ArticleDetail.js | 2 +- components/Comment.js | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blog.config.js b/blog.config.js index 2103e7c4..d35bb178 100644 --- a/blog.config.js +++ b/blog.config.js @@ -56,13 +56,13 @@ const BLOG = { telegram: 'https://t.me/tangly_1024' }, comment: { // 评论插件,支持 gitalk, utterances, cusdis - provider: '', // 不需要则留空白 + provider: 'gitalk', // 不需要则留空白 gitalkConfig: { repo: 'NotionNext', // The repository of store comments owner: 'tangly1024', admin: ['tangly1024'], - clientID: 'be7864a16b693e256f8f', - clientSecret: 'dbd0f6d9ceea8940f6ed20936b415274b8fe66a2', + clientID: process.env.GITALK_ID || 'be7864a16b693e256f8f', + clientSecret: process.env.GITALK_SECRET || 'dbd0f6d9ceea8940f6ed20936b415274b8fe66a2', distractionFreeMode: false }, cusdisConfig: { diff --git a/components/ArticleDetail.js b/components/ArticleDetail.js index 458e9445..e099dc48 100644 --- a/components/ArticleDetail.js +++ b/components/ArticleDetail.js @@ -172,7 +172,7 @@ export default function ArticleDetail ({ post, recommendPosts, prev, next }) { {/* 评论互动 */} -
+
) diff --git a/components/Comment.js b/components/Comment.js index ea747509..5e49f4d3 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -2,6 +2,7 @@ import BLOG from '@/blog.config' import dynamic from 'next/dynamic' import { useRouter } from 'next/router' import { useGlobal } from '@/lib/global' +import 'gitalk/dist/gitalk.css' const GitalkComponent = dynamic( () => {