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:
12
_config.yml
12
_config.yml
@@ -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
|
||||||
|
|||||||
@@ -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: ''
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user