mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feat: 将Remark42的可选配置归入option
This commit is contained in:
@@ -360,9 +360,7 @@ remark42:
|
|||||||
host: # Your Host URL/你的Remark42的部署地址
|
host: # Your Host URL/你的Remark42的部署地址
|
||||||
siteId: remark # Your Site ID/你的站点ID
|
siteId: remark # Your Site ID/你的站点ID
|
||||||
language: en # https://remark42.com/docs/configuration/frontend/#locales
|
language: en # https://remark42.com/docs/configuration/frontend/#locales
|
||||||
showEmailSubscription: true # Show Email Subscription/是否显示邮件订阅
|
option:
|
||||||
simpleView: false # Turn On the Simple View Mode/简单模式
|
|
||||||
maxShownComments: 15 # The Max Shown Comments When the System loaded/默认加载时评论的显示数量
|
|
||||||
|
|
||||||
# Chat Services
|
# Chat Services
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
- const { host, siteId, language } = theme.remark42
|
- const { host, siteId, language, option } = theme.remark42
|
||||||
script.
|
script.
|
||||||
let nowTheme = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
|
let nowTheme = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
|
||||||
var remark_config = {
|
var remark_config = Object.assign({
|
||||||
host: '!{host}',
|
host: '!{host}',
|
||||||
site_id: '!{siteId}',
|
site_id: '!{siteId}',
|
||||||
components: ['embed'],
|
components: ['embed'],
|
||||||
locale: '!{language}',
|
locale: '!{language}',
|
||||||
show_email_subscription: #{theme.remark42.showEmailSubscription},
|
},!{JSON.stringify(option)})
|
||||||
theme: nowTheme,
|
|
||||||
simple_view: #{theme.remark42.simpleView}
|
|
||||||
}
|
|
||||||
|
|
||||||
script.
|
script.
|
||||||
function loadRemark42(){
|
function loadRemark42(){
|
||||||
|
|||||||
Reference in New Issue
Block a user