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

@@ -8,7 +8,7 @@ script.
function loadGitalk () {
function initGitalk () {
var gitalk = new Gitalk({
var gitalk = new Gitalk(Object.assign({
clientID: '!{theme.gitalk.client_id}',
clientSecret: '!{theme.gitalk.client_secret}',
repo: '!{theme.gitalk.repo}',
@@ -21,7 +21,8 @@ script.
pagerDirection: '!{theme.gitalk.pagerDirection}',
createIssueManually: !{theme.gitalk.createIssueManually},
updateCountCallback: commentCount
})
},!{JSON.stringify(theme.gitalk.option)}))
gitalk.render('gitalk-container')
}