mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
breaking changes: 移除 waline 的 emojiCDN 和 emojiMaps 配置
fix: 修復 升級到 waline 1.x 而出現的 bug
This commit is contained in:
@@ -331,7 +331,6 @@ valine:
|
|||||||
waline:
|
waline:
|
||||||
serverURL: # Waline server address url
|
serverURL: # Waline server address url
|
||||||
avatar: monsterid # gravatar style https://zh-tw.gravatar.com/site/implement/images/#default-image
|
avatar: monsterid # gravatar style https://zh-tw.gravatar.com/site/implement/images/#default-image
|
||||||
emojiCDN: # emoji CDN
|
|
||||||
bg: # waline background
|
bg: # waline background
|
||||||
visitor: false
|
visitor: false
|
||||||
option:
|
option:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ script.
|
|||||||
function loadWaline () {
|
function loadWaline () {
|
||||||
function initWaline () {
|
function initWaline () {
|
||||||
let initData = {
|
let initData = {
|
||||||
el: '#waline-wrap',
|
el: null,
|
||||||
serverURL: '!{theme.waline.serverURL}',
|
serverURL: '!{theme.waline.serverURL}',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
- let emojiMaps = '""'
|
|
||||||
if site.data.waline
|
|
||||||
- emojiMaps = JSON.stringify(site.data.waline)
|
|
||||||
|
|
||||||
script.
|
script.
|
||||||
function loadWaline () {
|
function loadWaline () {
|
||||||
function initWaline () {
|
function initWaline () {
|
||||||
@@ -10,8 +6,6 @@ script.
|
|||||||
serverURL: '!{theme.waline.serverURL}',
|
serverURL: '!{theme.waline.serverURL}',
|
||||||
avatar: '#{theme.waline.avatar}',
|
avatar: '#{theme.waline.avatar}',
|
||||||
path: location.pathname,
|
path: location.pathname,
|
||||||
emojiCDN: '#{theme.waline.emojiCDN}',
|
|
||||||
emojiMaps: !{emojiMaps},
|
|
||||||
visitor: #{theme.waline.visitor},
|
visitor: #{theme.waline.visitor},
|
||||||
dark: 'html[data-theme="dark"]'
|
dark: 'html[data-theme="dark"]'
|
||||||
}, !{JSON.stringify(theme.waline.option)}))
|
}, !{JSON.stringify(theme.waline.option)}))
|
||||||
|
|||||||
@@ -53,11 +53,10 @@ script.
|
|||||||
const getComment = () => {
|
const getComment = () => {
|
||||||
const loadWaline = () => {
|
const loadWaline = () => {
|
||||||
Waline.Widget.RecentComments({
|
Waline.Widget.RecentComments({
|
||||||
el: '#card-newest-comments .aside-list',
|
|
||||||
serverURL: '!{theme.waline.serverURL}',
|
serverURL: '!{theme.waline.serverURL}',
|
||||||
count: !{theme.newest_comments.limit}
|
count: !{theme.newest_comments.limit}
|
||||||
}).then(comments => {
|
}).then(res => {
|
||||||
const walineArray = comments.map(function (e) {
|
const walineArray = res.comments.map(e => {
|
||||||
return {
|
return {
|
||||||
'content': changeContent(e.comment),
|
'content': changeContent(e.comment),
|
||||||
'avatar': getIcon(e.QQAvatar,e.mail),
|
'avatar': getIcon(e.QQAvatar,e.mail),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.8.0-b1",
|
"version": "3.8.0-b2",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user