Skip to content

Commit

Permalink
fix: Waline 評論系統 設置 avatarCDN 無效的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryc127 committed Jul 29, 2021
1 parent 641fb56 commit 101cb45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions layout/includes/third-party/comments/waline.pug
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
- const { serverURL, avatar, avatarCDN, visitor, option } = theme.waline

script.
function loadWaline () {
function initWaline () {
const waline = new Waline(Object.assign({
el: '#waline-wrap',
serverURL: '!{theme.waline.serverURL}',
avatar: '#{theme.waline.avatar}',
serverURL: '!{serverURL}',
avatar: '#{avatar}',
avatarCDN: '!{avatarCDN || "https://sdn.geekzu.org/avatar/"}',
path: location.pathname,
visitor: #{theme.waline.visitor},
visitor: !{visitor},
dark: 'html[data-theme="dark"]'
}, !{JSON.stringify(theme.waline.option)}))
}, !{JSON.stringify(option)}))
}

if (typeof Waline === 'function') initWaline()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
"version": "3.8.2",
"version": "3.8.3",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
Expand Down

0 comments on commit 101cb45

Please sign in to comment.