mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 18:00:53 +08:00
Merge branch 'master' of https://github.com/jerryc127/hexo-theme-butterfly
This commit is contained in:
@@ -244,12 +244,19 @@ gitalk:
|
||||
repo:
|
||||
owner:
|
||||
admin:
|
||||
<<<<<<< HEAD
|
||||
language: zh-CN # en , zh-CN , zh-TW
|
||||
perPage: 10 # Pagination size, with maximum 100.
|
||||
distractionFreeMode: false # Facebook-like distraction free mode.
|
||||
pagerDirection: last # Comment sorting direction, available values are last and first.
|
||||
createIssueManually: false # Gitalk will create a corresponding github issue for your every single page automatically
|
||||
count: true # top_img顯示評論數
|
||||
=======
|
||||
language: # en , zh-CN , zh-TW
|
||||
count: false # top_img顯示評論數
|
||||
createIssueManually: false
|
||||
distractionFreeMode: false
|
||||
>>>>>>> c40db692bfcb921b55976b6308b7d5d84f988113
|
||||
|
||||
# valine comment system. https://valine.js.org
|
||||
valine:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
#gitalk-container
|
||||
script.
|
||||
var gitalk = new Gitalk({
|
||||
@@ -15,6 +16,26 @@ script.
|
||||
updateCountCallback: commentCount
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
=======
|
||||
if theme.gitalk && theme.gitalk.enable
|
||||
#gitalk-container
|
||||
script.
|
||||
var createIssueManually = #{ theme.gitalk.createIssueManually } == true ? true : false;
|
||||
var distractionFreeMode = #{ theme.gitalk.distractionFreeMode } == true ? true : false;
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '!{theme.gitalk.client_id}',
|
||||
clientSecret: '!{theme.gitalk.client_secret}',
|
||||
repo: '!{theme.gitalk.repo}',
|
||||
owner: '!{theme.gitalk.owner}',
|
||||
admin: '!{theme.gitalk.admin}',
|
||||
id: md5(decodeURI(location.pathname)),
|
||||
createIssueManually: createIssueManually,
|
||||
distractionFreeMode: distractionFreeMode,
|
||||
language: '!{theme.gitalk.language}',
|
||||
updateCountCallback: commentCount
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
>>>>>>> c40db692bfcb921b55976b6308b7d5d84f988113
|
||||
|
||||
function commentCount(n){
|
||||
document.getElementsByClassName('gitalk-comment-count')[0].innerHTML= n
|
||||
|
||||
Reference in New Issue
Block a user