mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-20 19:34:05 -06:00
Update Body.tsx
This commit is contained in:
parent
22f752d6ce
commit
8f9b3a642e
@ -4,17 +4,20 @@ import clipboardStyle from "./styles/clipboard.scss"
|
|||||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||||
|
|
||||||
const Body: QuartzComponent = ({ children }: QuartzComponentProps) => {
|
const Body: QuartzComponent = ({ children }: QuartzComponentProps) => {
|
||||||
return
|
return (
|
||||||
<div id="quartz-body">{children}
|
<div id="quartz-body">
|
||||||
<div id="tcomment"></div>
|
{children}
|
||||||
|
<div id="tcomment"></div>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.41/dist/twikoo.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/twikoo@1.6.41/dist/twikoo.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
twikoo.init({
|
twikoo.init({
|
||||||
envId: 'https://enneatwikoo.netlify.app/.netlify/functions/twikoo', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app)
|
envId: 'https://enneatwikoo.netlify.app/.netlify/functions/twikoo', // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app)
|
||||||
el: '#tcomment', // 容器元素
|
el: '#tcomment', // 容器元素
|
||||||
|
// path: location.pathname, // 用于区分不同文章的自定义 js 路径,如果您的文章路径不是 location.pathname,需传此参数
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Body.afterDOMLoaded = clipboardScript
|
Body.afterDOMLoaded = clipboardScript
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user