mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +08:00
修復 Waline 評論系統 設置 avatarCDN 無效的 bug
This commit is contained in:
14
README.md
14
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
|
||||
|
||||
<a href="https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=jerryc127/hexo-theme-butterfly" />
|
||||
</a>
|
||||
|
||||
## 📷 Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
17
README_CN.md
17
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......
|
||||
|
||||
## 截圖
|
||||
## ✨ 贡献者
|
||||
|
||||
<a href="https://github.com/jerryc127/hexo-theme-butterfly/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=jerryc127/hexo-theme-butterfly" />
|
||||
</a>
|
||||
|
||||
## 📷 截圖
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
11
layout/includes/third-party/comments/waline.pug
vendored
11
layout/includes/third-party/comments/waline.pug
vendored
@@ -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()
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user