diff --git a/_config.yml b/_config.yml index dbd1363..5df17fa 100644 --- a/_config.yml +++ b/_config.yml @@ -331,7 +331,6 @@ valine: waline: serverURL: # Waline server address url avatar: monsterid # gravatar style https://zh-tw.gravatar.com/site/implement/images/#default-image - emojiCDN: # emoji CDN bg: # waline background visitor: false option: diff --git a/layout/includes/third-party/card-post-count/waline.pug b/layout/includes/third-party/card-post-count/waline.pug index f823c1e..e748d86 100644 --- a/layout/includes/third-party/card-post-count/waline.pug +++ b/layout/includes/third-party/card-post-count/waline.pug @@ -3,7 +3,7 @@ script. function loadWaline () { function initWaline () { let initData = { - el: '#waline-wrap', + el: null, serverURL: '!{theme.waline.serverURL}', } diff --git a/layout/includes/third-party/comments/waline.pug b/layout/includes/third-party/comments/waline.pug index 0804536..275da02 100644 --- a/layout/includes/third-party/comments/waline.pug +++ b/layout/includes/third-party/comments/waline.pug @@ -1,7 +1,3 @@ -- let emojiMaps = '""' -if site.data.waline - - emojiMaps = JSON.stringify(site.data.waline) - script. function loadWaline () { function initWaline () { @@ -10,8 +6,6 @@ script. serverURL: '!{theme.waline.serverURL}', avatar: '#{theme.waline.avatar}', path: location.pathname, - emojiCDN: '#{theme.waline.emojiCDN}', - emojiMaps: !{emojiMaps}, visitor: #{theme.waline.visitor}, dark: '[data-theme="dark"]' }, !{JSON.stringify(theme.waline.option)})) diff --git a/layout/includes/third-party/newest-comments/waline.pug b/layout/includes/third-party/newest-comments/waline.pug index 8a09847..580beae 100644 --- a/layout/includes/third-party/newest-comments/waline.pug +++ b/layout/includes/third-party/newest-comments/waline.pug @@ -53,11 +53,10 @@ script. const getComment = () => { const loadWaline = () => { Waline.Widget.RecentComments({ - el: '#card-newest-comments .aside-list', serverURL: '!{theme.waline.serverURL}', count: !{theme.newest_comments.limit} - }).then(comments => { - const walineArray = comments.map(function (e) { + }).then(res => { + const walineArray = res.comments.map(e => { return { 'content': changeContent(e.comment), 'avatar': getIcon(e.QQAvatar,e.mail), @@ -91,4 +90,4 @@ script. newestCommentInit() document.addEventListener('pjax:complete', newestCommentInit) - }) + }) \ No newline at end of file diff --git a/package.json b/package.json index 0bbc312..f4c9c2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "3.7.7", + "version": "3.7.8", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": {