auto push via Ubuntu

This commit is contained in:
eallion
2019-12-27 23:11:48 +08:00
parent 96ef1478ef
commit d59ed0b401
2 changed files with 22 additions and 13 deletions

View File

@@ -178,10 +178,16 @@ addtoany:
#### Comments System #### #### Comments System ####
# ------------------------------------ # ------------------------------------
# Disqus.js 版评论系统应对大陆长城的折中方案兼容原版https://github.com/SukkaW/DisqusJS
# API 申请地址https://disqus.com/api/applications/
disqus: disqus:
enable: false enable: false #开启改为 true
shortname: shortname:
count: false # top_img顯示評論數 siteName:
apikey:
api: https://disqus.skk.moe/disqus/ #一般情况无需要修改
count: true # top_img顯示評論數
laibili: laibili:
enable: false enable: false

View File

@@ -1,13 +1,16 @@
if theme.disqus && theme.disqus.enable if theme.disqus && theme.disqus.enable
#disqus_thread #disqus_thread
link(href=('https://cdn.jsdelivr.net/npm/disqusjs@1.2/dist/disqusjs.css') rel='stylesheet')
script(src=('https://cdn.jsdelivr.net/npm/disqusjs@1.2/dist/disqus.js'))
script. script.
var unused = null; var dsqjs = new DisqusJS({
var disqus_config = function () { shortname: '!{theme.disqus.shortname}',
this.page.url = '!{ page.permalink }'; siteName: "!{theme.disqus.siteName}",
this.page.identifier = '!{ page.path }'; identifier: '!{ page.path }',
this.page.title = '!{ page.title }'; url: '!{ page.permalink }',
} title: '!{ page.title }',
var d = document, s = d.createElement('script'); api: '!{theme.disqus.api}',
s.src = "https://" + '!{theme.disqus.shortname}' +".disqus.com/embed.js"; apikey: '!{theme.disqus.apikey}',
s.setAttribute('data-timestamp', '' + +new Date()); admin: '',
(d.head || d.body).appendChild(s); adminLabel: ''
});