diff --git a/layout/includes/third-party/comments/waline.pug b/layout/includes/third-party/comments/waline.pug index ae1a382..2407e4a 100644 --- a/layout/includes/third-party/comments/waline.pug +++ b/layout/includes/third-party/comments/waline.pug @@ -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() diff --git a/package.json b/package.json index 6bfab0b..edd6bd6 100644 --- a/package.json +++ b/package.json @@ -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": {