Update Body.tsx

This commit is contained in:
enneaa 2025-03-27 11:17:13 +08:00 committed by GitHub
parent 22f752d6ce
commit 8f9b3a642e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,17 +4,20 @@ import clipboardStyle from "./styles/clipboard.scss"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
const Body: QuartzComponent = ({ children }: QuartzComponentProps) => {
return
<div id="quartz-body">{children}
<div id="tcomment"></div>
return (
<div id="quartz-body">
{children}
<div id="tcomment"></div>
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.41/dist/twikoo.min.js"></script>
<script>
twikoo.init({
envId: 'https://enneatwikoo.netlify.app/.netlify/functions/twikoo', // 腾讯云环境填 envIdVercel 环境填地址https://xxx.vercel.app
el: '#tcomment', // 容器元素
// path: location.pathname, // 用于区分不同文章的自定义 js 路径,如果您的文章路径不是 location.pathname需传此参数
})
</script>
</div>
)
}
Body.afterDOMLoaded = clipboardScript