mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
auto push via Ubuntu
This commit is contained in:
10
_config.yml
10
_config.yml
@@ -178,10 +178,16 @@ addtoany:
|
||||
|
||||
#### Comments System ####
|
||||
# ------------------------------------
|
||||
|
||||
# Disqus.js 版评论系统,应对大陆长城的折中方案,兼容原版:https://github.com/SukkaW/DisqusJS
|
||||
# API 申请地址:https://disqus.com/api/applications/
|
||||
disqus:
|
||||
enable: false
|
||||
enable: false #开启改为 true
|
||||
shortname:
|
||||
count: false # top_img顯示評論數
|
||||
siteName:
|
||||
apikey:
|
||||
api: https://disqus.skk.moe/disqus/ #一般情况无需要修改
|
||||
count: true # top_img顯示評論數
|
||||
|
||||
laibili:
|
||||
enable: false
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
if theme.disqus && theme.disqus.enable
|
||||
#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.
|
||||
var unused = null;
|
||||
var disqus_config = function () {
|
||||
this.page.url = '!{ page.permalink }';
|
||||
this.page.identifier = '!{ page.path }';
|
||||
this.page.title = '!{ page.title }';
|
||||
}
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = "https://" + '!{theme.disqus.shortname}' +".disqus.com/embed.js";
|
||||
s.setAttribute('data-timestamp', '' + +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
var dsqjs = new DisqusJS({
|
||||
shortname: '!{theme.disqus.shortname}',
|
||||
siteName: "!{theme.disqus.siteName}",
|
||||
identifier: '!{ page.path }',
|
||||
url: '!{ page.permalink }',
|
||||
title: '!{ page.title }',
|
||||
api: '!{theme.disqus.api}',
|
||||
apikey: '!{theme.disqus.apikey}',
|
||||
admin: '',
|
||||
adminLabel: ''
|
||||
});
|
||||
Reference in New Issue
Block a user