diff --git a/components/Comment.js b/components/Comment.js index 3cc9b76e..d150e805 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -63,6 +63,7 @@ const ValineComponent = dynamic(() => import('@/components/ValineComponent'), { const Comment = ({ siteInfo, frontMatter, className }) => { const router = useRouter() + // 当连接中有特殊参数时跳转到评论区 if (isBrowser && ('giscus' in router.query || router.query.target === 'comment')) { setTimeout(() => { const url = router.asPath.replace('?target=comment', '') diff --git a/components/CommonScript.js b/components/CommonScript.js deleted file mode 100644 index 779432ba..00000000 --- a/components/CommonScript.js +++ /dev/null @@ -1,113 +0,0 @@ -import BLOG from '@/blog.config' - -/** - * 统计脚本 - * @returns {JSX.Element} - * @constructor - */ -const CommonScript = () => { - return (<> - - {BLOG.CHATBASE_ID && (<> - } - - {BLOG.COMMENT_CUSDIS_APP_ID && } + + {siteConfig('COMMENT_TWIKOO_ENV_ID') &&