From 45d6ced50792a149ec0a090e4d35cc431f082faa Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 30 Jul 2021 01:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=BE=A9=20Waline=20=E8=A9=95?= =?UTF-8?q?=E8=AB=96=E7=B3=BB=E7=B5=B1=20=E8=A8=AD=E7=BD=AE=20avatarCDN=20?= =?UTF-8?q?=E7=84=A1=E6=95=88=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++++++++---- README_CN.md | 17 ++++++++++++----- layout/includes/third-party/comments/waline.pug | 11 +++++++---- package.json | 2 +- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 54757a8..9001868 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Docs: 📖 [Butterfly Docs](https://butterfly.js.org/posts/21cfbf15/) Based on [hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody) theme. -## Installation +## 💻 Installation ### GIT @@ -48,7 +48,7 @@ In Hexo site root directory npm i hexo-theme-butterfly ``` -## Configuration +## ⚙ Configuration Set theme in the hexo work folder's root config file `_config.yml`: @@ -58,7 +58,7 @@ npm i hexo-theme-butterfly > npm install hexo-renderer-pug hexo-renderer-stylus -## Features +## 🎉 Features - [x] Card UI Design - [X] Support sub-menu @@ -97,7 +97,13 @@ npm i hexo-theme-butterfly - [x] Lazyload images - [x] Instantpage/Pangu/Snackbar notification toast/PWA...... -## Screenshots +## ✨ Contributors + + + + + +## 📷 Screenshots ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-1.jpg) ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-2.jpg) diff --git a/README_CN.md b/README_CN.md index 6721269..8dc6794 100644 --- a/README_CN.md +++ b/README_CN.md @@ -20,7 +20,7 @@ 一款基於[hexo-theme-melody](https://github.com/Molunerfinn/hexo-theme-melody)修改的主題 -## 安裝 +## 💻 安裝 ### Git 安裝 @@ -48,7 +48,8 @@ git clone -b dev https://github.com/jerryc127/hexo-theme-butterfly.git themes/bu npm i hexo-theme-butterfly ``` -## 應用主題 +## ⚙ 應用主題 + 修改hexo配置文件`_config.yml`,把主題改為`Butterfly` ``` @@ -57,7 +58,7 @@ theme: butterfly >如果你沒有pug以及stylus的渲染器,請下載安裝: npm install hexo-renderer-pug hexo-renderer-stylus --save -## 特色 +## 🎉 特色 - [x] 卡片化設計 - [X] 支持二級目錄 @@ -96,11 +97,17 @@ theme: butterfly - [x] 圖片懶加載 - [x] Instantpage/Pangu/Snackbar彈窗/PWA...... -## 截圖 +## ✨ 贡献者 + + + + + +## 📷 截圖 ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-1.jpg) ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-2.jpg) ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-3.jpg) ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN@m2/img/butterfly-readme-screenshots-4.jpg) ![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-1.png) -![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-2.png) \ No newline at end of file +![](https://cdn.jsdelivr.net/gh/jerryc127/CDN/img/theme-butterfly-readme-homepage-2.png) 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 c8b5a00..42f73d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "4.0.0-b1", + "version": "4.0.0-b2", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": {