mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
feat: 添加 artitalk 説説插件
style: 主題文件分類調正
This commit is contained in:
24
layout/includes/third-party/artitalk.pug
vendored
Normal file
24
layout/includes/third-party/artitalk.pug
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
- let option = theme.artitalk.option ? JSON.stringify(theme.artitalk.option) : false
|
||||
|
||||
script.
|
||||
(()=>{
|
||||
let setting = {
|
||||
appId: '!{theme.artitalk.appId}',
|
||||
appKey: '!{theme.artitalk.appKey}',
|
||||
}
|
||||
|
||||
if (!{Boolean(option)}) {
|
||||
const otherSetting = !{option}
|
||||
setting = Object.assign({}, setting, otherSetting)
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
new Artitalk(setting)
|
||||
}
|
||||
|
||||
if (typeof Artitalk === 'function') {
|
||||
init()
|
||||
} else {
|
||||
$.getScript('!{theme.CDN.artitalk}',init)
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user