From 101cb45b90a4b8ad6222201db3580869bf252eac Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 30 Jul 2021 01:00:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Waline=20=E8=A9=95=E8=AB=96=E7=B3=BB?= =?UTF-8?q?=E7=B5=B1=20=E8=A8=AD=E7=BD=AE=20avatarCDN=20=E7=84=A1=E6=95=88?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/third-party/comments/waline.pug | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/layout/includes/third-party/comments/waline.pug b/layout/includes/third-party/comments/waline.pug index ae1a3822e..2407e4a7c 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 6bfab0b78..edd6bd6c1 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": {