feat: gitalk 增加 option 配置

improvement: pug代碼優化
This commit is contained in:
Jerry
2021-02-20 23:10:28 +08:00
parent b176ff0fa7
commit 41e1931a3a
5 changed files with 11 additions and 38 deletions

View File

@@ -1,21 +1,12 @@
- let option = theme.twikoo.option ? JSON.stringify(theme.twikoo.option) : false
script.
(()=>{
const $countDom = document.getElementById('twikoo-count')
const init = () => {
let initData = {
twikoo.init(Object.assign({
el: '#twikoo-wrap',
envId: '!{theme.twikoo.envId}',
region: '!{theme.twikoo.region}'
}
if (!{Boolean(option)}) {
const otherData = !{option}
initData = Object.assign(initData, otherData)
}
twikoo.init(initData)
}, !{JSON.stringify(theme.twikoo.option)}))
}
const getCount = () => {