mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 06:22:00 +08:00
💥 支持雙評論系統配置/評論配置整理
✨ 增加mac light 代碼框 ✨ 增加文章過期提醒配置 ✨ 文章copyright 可單獨配置 ✨ card-category 中category名稱和數字限制一行顯示 ✨ 簡繁轉換優化,placeholder文字也會被轉換 🐛 修復配置PWA參數時,如果網站是子目錄時,會出現加載不到文件的bugs 調整當card-category有收縮按鈕時的顯示佈局
This commit is contained in:
1 parent
67b49c01ba
commit
4d34208391
47 files changed
+782
-501
No files matched your search
+18
-13
@@ -20,7 +20,7 @@ menu:
|
|||||||
# Code Blocks (代碼相關)
|
# Code Blocks (代碼相關)
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|
||||||
highlight_theme: light # default / darker / pale night / light / ocean / mac / false
|
highlight_theme: light # default / darker / pale night / light / ocean / mac / mac light / false
|
||||||
highlight_copy: true # copy button
|
highlight_copy: true # copy button
|
||||||
highlight_lang: true # show the code language
|
highlight_lang: true # show the code language
|
||||||
highlight_shrink: false # true: shrink the code blocks / false: expand the code blocks | none: expand code blocks and hide the button
|
highlight_shrink: false # true: shrink the code blocks / false: expand the code blocks | none: expand code blocks and hide the button
|
||||||
@@ -200,6 +200,15 @@ photofigcaption: false
|
|||||||
# when you scroll in post, the URL will update according to header id.
|
# when you scroll in post, the URL will update according to header id.
|
||||||
anchor: false
|
anchor: false
|
||||||
|
|
||||||
|
# Displays outdated notice for a post (文章過期提醒)
|
||||||
|
noticeOutdate:
|
||||||
|
enable: false
|
||||||
|
style: flat # style: simple/flat
|
||||||
|
limit_day: 500 # When will it be shown
|
||||||
|
position: top # position: top/bottom
|
||||||
|
message_prev: It has been
|
||||||
|
message_next: days since the last update, the content of the article may be outdated.
|
||||||
|
|
||||||
# Share System (分享功能)
|
# Share System (分享功能)
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|
||||||
@@ -231,18 +240,23 @@ addtoany:
|
|||||||
# Comments System
|
# Comments System
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|
||||||
|
comments:
|
||||||
|
# Up to two comments system, the first will be shown as default
|
||||||
|
# Disqus/Disqusjs/Livere/Gitalk/Valine/Utterances/Facebook Comments
|
||||||
|
use:
|
||||||
|
text: true # Display the comment name next to the button
|
||||||
|
load_begin: false # The second comment system will auto load when visiting the website
|
||||||
|
count: false # Dispaly comment count in top_img
|
||||||
|
|
||||||
# disqus
|
# disqus
|
||||||
# https://disqus.com/
|
# https://disqus.com/
|
||||||
disqus:
|
disqus:
|
||||||
enable: false
|
|
||||||
shortname:
|
shortname:
|
||||||
count: false # dispaly comment count in top_img
|
|
||||||
|
|
||||||
# Alternative Disqus - Render comments with Disqus API
|
# Alternative Disqus - Render comments with Disqus API
|
||||||
# DisqusJS評論系統,可以實現在網路審查地區載入 Disqus 評論列表,兼容原版
|
# DisqusJS評論系統,可以實現在網路審查地區載入 Disqus 評論列表,兼容原版
|
||||||
# https://github.com/SukkaW/DisqusJS
|
# https://github.com/SukkaW/DisqusJS
|
||||||
disqusjs:
|
disqusjs:
|
||||||
enable: false
|
|
||||||
shortname:
|
shortname:
|
||||||
siteName:
|
siteName:
|
||||||
apikey:
|
apikey:
|
||||||
@@ -250,18 +264,15 @@ disqusjs:
|
|||||||
nocomment: # display when a blog post or an article has no comment attached
|
nocomment: # display when a blog post or an article has no comment attached
|
||||||
admin:
|
admin:
|
||||||
adminLabel:
|
adminLabel:
|
||||||
count: false # dispaly comment count in top_img
|
|
||||||
|
|
||||||
# livere(來必力)
|
# livere(來必力)
|
||||||
# https://www.livere.com/
|
# https://www.livere.com/
|
||||||
livere:
|
livere:
|
||||||
enable: false
|
|
||||||
uid:
|
uid:
|
||||||
|
|
||||||
# gitalk
|
# gitalk
|
||||||
# https://github.com/gitalk/gitalk
|
# https://github.com/gitalk/gitalk
|
||||||
gitalk:
|
gitalk:
|
||||||
enable: false
|
|
||||||
client_id:
|
client_id:
|
||||||
client_secret:
|
client_secret:
|
||||||
repo:
|
repo:
|
||||||
@@ -272,12 +283,10 @@ gitalk:
|
|||||||
distractionFreeMode: false # Facebook-like distraction free mode.
|
distractionFreeMode: false # Facebook-like distraction free mode.
|
||||||
pagerDirection: last # Comment sorting direction, available values are last and first.
|
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
|
createIssueManually: false # Gitalk will create a corresponding github issue for your every single page automatically
|
||||||
count: false # dispaly comment count in top_img
|
|
||||||
|
|
||||||
# valine
|
# valine
|
||||||
# https://valine.js.org
|
# https://valine.js.org
|
||||||
valine:
|
valine:
|
||||||
enable: false # if you want use valine,please set this value is true
|
|
||||||
appId: # leancloud application app id
|
appId: # leancloud application app id
|
||||||
appKey: # leancloud application app key
|
appKey: # leancloud application app key
|
||||||
pageSize: 10 # comment list page size
|
pageSize: 10 # comment list page size
|
||||||
@@ -291,12 +300,10 @@ valine:
|
|||||||
emojiCDN: # emoji CDN
|
emojiCDN: # emoji CDN
|
||||||
enableQQ: false # enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
enableQQ: false # enable the Nickname box to automatically get QQ Nickname and QQ Avatar
|
||||||
requiredFields: nick,mail # required fields (nick/mail)
|
requiredFields: nick,mail # required fields (nick/mail)
|
||||||
count: false # dispaly comment count in top_img
|
|
||||||
|
|
||||||
# utterances
|
# utterances
|
||||||
# https://utteranc.es/
|
# https://utteranc.es/
|
||||||
utterances:
|
utterances:
|
||||||
enable: false
|
|
||||||
repo:
|
repo:
|
||||||
# Issue Mapping: pathname/url/title/og:title
|
# Issue Mapping: pathname/url/title/og:title
|
||||||
issue_term: pathname
|
issue_term: pathname
|
||||||
@@ -307,13 +314,11 @@ utterances:
|
|||||||
# Facebook Comments Plugin
|
# Facebook Comments Plugin
|
||||||
# https://developers.facebook.com/docs/plugins/comments/
|
# https://developers.facebook.com/docs/plugins/comments/
|
||||||
facebook_comments:
|
facebook_comments:
|
||||||
enable: false
|
|
||||||
app_id:
|
app_id:
|
||||||
user_id: # optional
|
user_id: # optional
|
||||||
pageSize: 10 # The number of comments to show
|
pageSize: 10 # The number of comments to show
|
||||||
order_by: social # social/time/reverse_time
|
order_by: social # social/time/reverse_time
|
||||||
lang: en_US # Language en_US/zh_CN/zh_TW and so on
|
lang: en_US # Language en_US/zh_CN/zh_TW and so on
|
||||||
count: false
|
|
||||||
|
|
||||||
# Chat Services
|
# Chat Services
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|||||||
@@ -1,18 +1,28 @@
|
|||||||
#disqus_thread
|
#disqus_thread
|
||||||
script.
|
script.
|
||||||
|
function loadDisqus () {
|
||||||
var disqus_config = function () {
|
var disqus_config = function () {
|
||||||
this.page.url = '!{ page.permalink }';
|
this.page.url = '!{ page.permalink }';
|
||||||
this.page.identifier = '!{ page.path }';
|
this.page.identifier = '!{ page.path }';
|
||||||
this.page.title = '!{ page.title }';
|
this.page.title = '!{ page.title }';
|
||||||
};
|
};
|
||||||
(function() {
|
|
||||||
var d = document, s = d.createElement('script');
|
var d = document, s = d.createElement('script');
|
||||||
s.src = 'https://!{theme.disqus.shortname}.disqus.com/embed.js';
|
s.src = 'https://!{theme.disqus.shortname}.disqus.com/embed.js';
|
||||||
s.setAttribute('data-timestamp', +new Date());
|
s.setAttribute('data-timestamp', +new Date());
|
||||||
(d.head || d.body).appendChild(s);
|
(d.head || d.body).appendChild(s);
|
||||||
})();
|
}
|
||||||
|
|
||||||
if is_post() && theme.disqus.count
|
if ('!{defaultComment}' === 'Disqus' || !{theme.comments.load_begin}) {
|
||||||
|
window.addEventListener('load', loadDisqus)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
function loadOtherComment () {
|
||||||
|
loadDisqus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if is_post() && theme.comments.count && defaultComment === 'Disqus'
|
||||||
script.
|
script.
|
||||||
function getDisqusCount() {
|
function getDisqusCount() {
|
||||||
var d = document, s = d.createElement('script');
|
var d = document, s = d.createElement('script');
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
#disqus_thread
|
#disqus_thread
|
||||||
script(src=url_for(theme.CDN.disqusjs))
|
|
||||||
script.
|
script.
|
||||||
|
function loadDisqusjs () {
|
||||||
|
const ele = document.createElement('link')
|
||||||
|
ele.rel = 'stylesheet'
|
||||||
|
ele.href= '!{url_for(theme.CDN.disqusjs_css)}'
|
||||||
|
document.getElementsByTagName('head')[0].appendChild(ele)
|
||||||
|
|
||||||
|
loadScript('!{url_for(theme.CDN.disqusjs)}', function() {
|
||||||
var dsqjs = new DisqusJS({
|
var dsqjs = new DisqusJS({
|
||||||
shortname: '!{theme.disqusjs.shortname}',
|
shortname: '!{theme.disqusjs.shortname}',
|
||||||
siteName: '!{theme.disqusjs.siteName}',
|
siteName: '!{theme.disqusjs.siteName}',
|
||||||
@@ -13,8 +19,20 @@ script.
|
|||||||
admin: '!{theme.disqusjs.admin}',
|
admin: '!{theme.disqusjs.admin}',
|
||||||
adminLabel: '!{theme.disqusjs.adminLabel}'
|
adminLabel: '!{theme.disqusjs.adminLabel}'
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if is_post() && theme.disqusjs.count
|
if ('!{defaultComment}' === 'Disqusjs' || !{theme.comments.load_begin}) {
|
||||||
|
window.addEventListener('load', loadDisqusjs)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
function loadOtherComment () {
|
||||||
|
loadDisqusjs()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if is_post() && theme.comments.count && defaultComment === 'Disqusjs'
|
||||||
script.
|
script.
|
||||||
function getDisqusCount() {
|
function getDisqusCount() {
|
||||||
var d = document, s = d.createElement('script');
|
var d = document, s = d.createElement('script');
|
||||||
|
|||||||
Loaded 3 of 47 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user