hexo-theme-solitude 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,11 +10,11 @@
10
10
 
11
11
  主题由 [@张洪Heo](https://github.com/zhheo) 作者全权授权、设计!
12
12
 
13
- ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?color=blue&logo=npm)
13
+ ![npm package](https://img.shields.io/npm/v/hexo-theme-solitude?logo=npm)
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
15
15
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
16
16
  [![Stars](https://img.shields.io/github/stars/valor-x/hexo-theme-solitude)](https://github.com/valor-x/hexo-theme-solitude/stargazers)
17
- [![GitHub all releases](https://img.shields.io/github/downloads/valor-x/hexo-theme-solitude/total)](https://github.com/valor-x/hexo-theme-solitude/releases/latest)
17
+ [![NPM all downloads](https://img.shields.io/npm/dy/hexo-theme-solitude?color=white)](https://www.npmjs.com/package/hexo-theme-solitude)
18
18
 
19
19
  ![hexo version](https://img.shields.io/badge/hexo-7.0.0+-blue?logo=hexo&logoColor=white)
20
20
  ![node version](https://img.shields.io/badge/node-14.0.0-white?logo=node.js&logoColor=white)
@@ -28,8 +28,9 @@
28
28
  ![mermaid](https://img.shields.io/badge/mermaid-ff3670?logo=mermaid&logoColor=white)
29
29
  [![pwa](https://img.shields.io/badge/pwa-red?logo=pwa)](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
30
30
 
31
- [![twiter](https://img.shields.io/badge/@efu__oo-gray?logo=x)](https://twitter.com/efu_oo)
32
- [![TG](https://img.shields.io/badge/efuome-gray?logo=Telegram&logoColor=white)](https://t.me/solitudePro)
31
+ [![twiter](https://img.shields.io/badge/Twitter-gray?logo=x)](https://twitter.com/efu_oo)
32
+ [![TG](https://img.shields.io/badge/Telegram-gray?logo=Telegram&logoColor=white)](https://t.me/solitudePro)
33
+ [![Discord](https://img.shields.io/discord/1218118131428495430?label=Discord&logo=Discord&labelColor=white&color=black)](https://discord.gg/Y8VEvVgW)
33
34
 
34
35
  ![JetBrains](https://img.shields.io/badge/jetbrains-support-black?logo=jetbrains)
35
36
  ![DuoLingo](https://img.shields.io/badge/duolingo-support-black?logo=duolingo&logoColor=white)
@@ -37,7 +38,7 @@
37
38
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
38
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
39
40
 
40
- [预览](https://efu.me/) 丨 [文档](https://solitude-docs.efu.me/)
41
+ [预览](https://www.efu.me/) 丨 [文档](https://solitude-docs.efu.me/)
41
42
 
42
43
  </div>
43
44
 
@@ -47,7 +48,7 @@
47
48
 
48
49
  - 页面懒加载(Pjax)、图片懒加载(LazyLoad)、离线应用(PWA)
49
50
  - 评论(Twikoo、Waline、Valine、Artalk),支持双评论
50
- - 显示切换(ColorMode)
51
+ - 昼夜切换(ColorMode)
51
52
  - 灯箱(medium-zoom、fancybox)
52
53
  - 数学公式(Latex)
53
54
  - 特色页面:即刻短文、我的装备、在线工具、音乐馆、友链鱼塘、相册页、豆瓣页
@@ -55,9 +56,11 @@
55
56
 
56
57
  ## Todo
57
58
 
58
- - [x] Waline 评论支持
59
- - [ ] Tags plugin 插件化
60
- - [ ] 相册页重构(已移除,待重构)
59
+ - [x] Artalk 评论
60
+ - [x] 双评论
61
+ - [x] 相册
62
+
63
+ > 如有問題請提 [issue](https://github.com/valor-x/hexo-theme-solitude/issues)
61
64
 
62
65
  ## 应用
63
66
 
package/README_en.md CHANGED
@@ -14,7 +14,7 @@
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
15
15
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
16
16
  [![Stars](https://img.shields.io/github/stars/valor-x/hexo-theme-solitude)](https://github.com/valor-x/hexo-theme-solitude/stargazers)
17
- [![GitHub all releases](https://img.shields.io/github/downloads/valor-x/hexo-theme-solitude/total)](https://github.com/valor-x/hexo-theme-solitude/releases/latest)
17
+ [![NPM all downloads](https://img.shields.io/npm/dy/hexo-theme-solitude?color=white)](https://www.npmjs.com/package/hexo-theme-solitude)
18
18
 
19
19
  ![hexo version](https://img.shields.io/badge/hexo-7.0.0+-blue?logo=hexo&logoColor=white)
20
20
  ![node version](https://img.shields.io/badge/node-14.0.0-white?logo=node.js&logoColor=white)
@@ -28,8 +28,9 @@
28
28
  ![mermaid](https://img.shields.io/badge/mermaid-ff3670?logo=mermaid&logoColor=white)
29
29
  [![pwa](https://img.shields.io/badge/pwa-red?logo=pwa)](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
30
30
 
31
- [![twiter](https://img.shields.io/badge/@efu__oo-gray?logo=x)](https://twitter.com/efu_oo)
32
- [![TG](https://img.shields.io/badge/efuome-gray?logo=Telegram&logoColor=white)](https://t.me/solitudePro)
31
+ [![twiter](https://img.shields.io/badge/Twitter-gray?logo=x)](https://twitter.com/efu_oo)
32
+ [![TG](https://img.shields.io/badge/Telegram-gray?logo=Telegram&logoColor=white)](https://t.me/solitudePro)
33
+ [![Discord](https://img.shields.io/discord/1218118131428495430?label=Discord&logo=Discord&labelColor=white&color=black)](https://discord.gg/Y8VEvVgW)
33
34
 
34
35
  ![JetBrains](https://img.shields.io/badge/jetbrains-support-black?logo=jetbrains)
35
36
  ![DuoLingo](https://img.shields.io/badge/duolingo-support-black?logo=duolingo&logoColor=white)
@@ -55,9 +56,11 @@
55
56
 
56
57
  ## Todo
57
58
 
58
- - [x] Support Waline
59
- - [ ] Tags plugin
60
- - [ ] Album reconstruction(Removed, to be refactored)
59
+ - [x] Artalk
60
+ - [x] Use double comment
61
+ - [x] Album
62
+
63
+ > If you have any questions, please issue an [issue](https://github.com/valor-x/hexo-theme-solitude/issues)
61
64
 
62
65
  ## Setup
63
66
 
package/README_zh-tw.md CHANGED
@@ -14,7 +14,7 @@
14
14
  ![release](https://img.shields.io/github/package-json/v/valor-x/hexo-theme-solitude/master?color=%231ab1ad&label=release)
15
15
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
16
16
  [![Stars](https://img.shields.io/github/stars/valor-x/hexo-theme-solitude)](https://github.com/valor-x/hexo-theme-solitude/stargazers)
17
- [![GitHub all releases](https://img.shields.io/github/downloads/valor-x/hexo-theme-solitude/total)](https://github.com/valor-x/hexo-theme-solitude/releases/latest)
17
+ [![NPM all downloads](https://img.shields.io/npm/dy/hexo-theme-solitude?color=white)](https://www.npmjs.com/package/hexo-theme-solitude)
18
18
 
19
19
  ![hexo version](https://img.shields.io/badge/hexo-7.0.0+-blue?logo=hexo&logoColor=white)
20
20
  ![node version](https://img.shields.io/badge/node-14.0.0-white?logo=node.js&logoColor=white)
@@ -28,8 +28,9 @@
28
28
  ![mermaid](https://img.shields.io/badge/mermaid-ff3670?logo=mermaid&logoColor=white)
29
29
  [![pwa](https://img.shields.io/badge/pwa-red?logo=pwa)](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
30
30
 
31
- [![twiter](https://img.shields.io/badge/@efu__oo-gray?logo=x)](https://twitter.com/efu_oo)
32
- [![TG](https://img.shields.io/badge/efuome-gray?logo=Telegram&logoColor=white)](https://t.me/solitudePro)
31
+ [![twiter](https://img.shields.io/badge/Twitter-gray?logo=x)](https://twitter.com/efu_oo)
32
+ [![TG](https://img.shields.io/badge/Telegram-gray?logo=Telegram&logoColor=white)](https://t.me/solitudePro)
33
+ [![Discord](https://img.shields.io/discord/1218118131428495430?label=Discord&logo=Discord&labelColor=white&color=black)](https://discord.gg/Y8VEvVgW)
33
34
 
34
35
  ![JetBrains](https://img.shields.io/badge/jetbrains-support-black?logo=jetbrains)
35
36
  ![DuoLingo](https://img.shields.io/badge/duolingo-support-black?logo=duolingo&logoColor=white)
@@ -47,7 +48,7 @@
47
48
 
48
49
  - 頁面懶載入(Pjax)、圖片懶載入(LazyLoad)、離線應用(PWA)
49
50
  - 評論(Twikoo、Waline、Valine、Artalk),支援雙評論
50
- - 顯示切換(ColorMode)
51
+ - 晝夜切換(ColorMode)
51
52
  - 燈箱(medium-zoom、fancybox)
52
53
  - 數學公式(Latex)
53
54
  - 特色頁面:即刻短文、我的裝備、在線工具、音樂館、友鏈魚塘、相冊頁、豆瓣頁
@@ -55,9 +56,9 @@
55
56
 
56
57
  ## Todo
57
58
 
58
- - [x] Waline 評論支援
59
- - [ ] Tags plugin 外掛程式化
60
- - [ ] 相冊頁重構(已移除,待重構)
59
+ - [x] Artalk 評論
60
+ - [x] 雙評論
61
+ - [x] 相冊
61
62
 
62
63
  ## 應用
63
64
 
@@ -80,19 +80,21 @@ div
80
80
  each item in theme.extends.body
81
81
  != item
82
82
 
83
- div#js-pjax
84
- if theme.mermaid
85
- script.
86
- mermaid.run();
87
- if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
88
- script.
89
- carousel_swiper()
90
- if page.type === 'says' && theme.says.enable
91
- script.
92
- GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
93
- sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
94
- if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
95
- script(async src=url_for(theme.cdn.busuanzi_js))
83
+ .js-pjax
84
+ if comment_js
85
+ include ../widgets/third-party/comments/js
86
+ if theme.mermaid
87
+ script.
88
+ mermaid.run();
89
+ if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
90
+ script.
91
+ carousel_swiper()
92
+ if page.type === 'says' && theme.says.enable
93
+ script.
94
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
95
+ sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
96
+ if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
97
+ script(async src=url_for(theme.cdn.busuanzi_js))
96
98
 
97
99
 
98
100
  if theme.footer.randomlink
@@ -28,7 +28,7 @@ if theme.pwa.enable
28
28
 
29
29
  script.
30
30
  console.log(
31
- "%c Program: Hexo %c Theme: Solitude %c Version: v1.8.1",
31
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.8.2",
32
32
  "border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
33
33
  "padding: 5px 10px;color:white;background:#3e9f50;",
34
34
  "border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
@@ -54,7 +54,7 @@ script.
54
54
 
55
55
  if commentBarrage
56
56
  script.
57
- const barrageArtalk = async array => {
57
+ async function barrageArtalk(array) {
58
58
  await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(() => {
59
59
  initializeCommentBarrage(array)
60
60
  })
@@ -39,15 +39,4 @@
39
39
  when 'Waline'
40
40
  #waline-wrap
41
41
  when 'Artalk'
42
- #artalk-wrap
43
-
44
- each name in use
45
- case name
46
- when 'Twikoo'
47
- !=partial('includes/widgets/third-party/comments/twikoo', {}, {cache: true})
48
- when 'Waline'
49
- !=partial('includes/widgets/third-party/comments/waline', {}, {cache: true})
50
- when 'Valine'
51
- !=partial('includes/widgets/third-party/comments/valine', {}, {cache: true})
52
- when 'Artalk'
53
- !=partial('includes/widgets/third-party/comments/artalk', {}, {cache: true})
42
+ #artalk-wrap
@@ -0,0 +1,12 @@
1
+ - const {use} = theme.comment
2
+
3
+ each name in use
4
+ case name
5
+ when 'Twikoo'
6
+ !=partial('includes/widgets/third-party/comments/twikoo', {}, {cache: true})
7
+ when 'Waline'
8
+ !=partial('includes/widgets/third-party/comments/waline', {}, {cache: true})
9
+ when 'Valine'
10
+ !=partial('includes/widgets/third-party/comments/valine', {}, {cache: true})
11
+ when 'Artalk'
12
+ !=partial('includes/widgets/third-party/comments/artalk', {}, {cache: true})
@@ -51,7 +51,7 @@ script.
51
51
 
52
52
  if commentBarrage
53
53
  script.
54
- const barrageTwikoo = async () => {
54
+ async function barrageTwikoo() {
55
55
  await fetch("!{envId}", {
56
56
  method: "POST",
57
57
  headers: {
@@ -39,7 +39,7 @@ script.
39
39
 
40
40
  if commentBarrage
41
41
  script.
42
- const barrageValine = async () => {
42
+ async function barrageValine() {
43
43
  const url = new URL('!{serverURLs}/1.1/classes/Comment')
44
44
  const params = {
45
45
  url: window.location.pathname,
@@ -56,15 +56,15 @@ if commentBarrage
56
56
  }).then(async res => {
57
57
  if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`)
58
58
  const data = await res.json()
59
- if(typeof md5 ==="undefined") await utils.getScript('!{url_for(theme.cdn.blueimp_md5)}')
60
- await utils.getScript('!{url_for(theme.cdn.commentBarrage)}')
61
- initializeCommentBarrage(data.results
62
- .filter(item => item.url === window.location.pathname)
63
- .map(item => ({
64
- content: item.comment,
65
- nick: item.nick,
66
- mailMd5: md5(item.mail),
67
- id: item.objectId
68
- })))
59
+ if (typeof md5 === "undefined") await utils.getScript('!{url_for(theme.cdn.blueimp_md5)}')
60
+ await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(() =>
61
+ initializeCommentBarrage(data.results
62
+ .filter(item => item.url === window.location.pathname)
63
+ .map(item => ({
64
+ content: item.comment,
65
+ nick: item.nick,
66
+ mailMd5: md5(item.mail),
67
+ id: item.objectId
68
+ }))))
69
69
  }).catch(error => console.error("An error occurred while fetching comments: ", error))
70
70
  }
@@ -1,5 +1,5 @@
1
- - const { envId, option ,pageview } = theme.comment.waline
2
- - const { lazyload, count, commentBarrage } = theme.comment
1
+ - const { envId, option ,pageview } = theme.waline
2
+ - const { lazyload, count, commentBarrage,use } = theme.comment
3
3
 
4
4
  script.
5
5
  !function () {
@@ -18,7 +18,10 @@ script.
18
18
  const walineInstance = initFn(walineOptions)
19
19
  utils.addGlobalFn('pjax', () => walineInstance.destroy(), 'destroyWaline')
20
20
  GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll('#comment .wl-content img:not(.wl-emoji)'))
21
- sco.owoBig()
21
+ sco.owoBig({
22
+ body: '.wl-emoji-popup',
23
+ item: '.wl-tab-wrapper button'
24
+ })
22
25
  }
23
26
 
24
27
  async function loadWaline() {
@@ -30,10 +33,10 @@ script.
30
33
  initWaline(walineInitFunction)
31
34
  window.walineFn = walineInitFunction
32
35
  }
33
- if (!{commentBarrage}) barrageWaline()
36
+ !{commentBarrage} && barrageWaline()
34
37
  }
35
38
 
36
- if ('!{use[0]}' === 'Valine' || !{lazyload}) {
39
+ if (!{use[0] === 'Waline'} || !{lazyload}) {
37
40
  if (!{lazyload}) utils.loadComment(document.getElementById('waline-wrap'), loadWaline)
38
41
  else loadWaline()
39
42
  } else window.loadTwoComment = loadWaline
@@ -41,24 +44,22 @@ script.
41
44
 
42
45
  if commentBarrage
43
46
  script.
44
- const barrageWaline = async () => {
47
+ async function barrageWaline() {
45
48
  const url = new URL('!{envId}/api/comment')
46
49
  const params = {path: window.location.pathname, sortBy: 'insertedAt_asc'}
47
50
  Object.entries(params).forEach(([key, value]) => url.searchParams.append(key, value))
48
- const response = await fetch(url, {
49
- method: "GET",
50
- headers: {
51
- "Content-Type": "application/json"
52
- },
53
- }).then(async res => {
54
- if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`)
55
- const data = await response.json();
56
- await utils.getScript('!{url_for(theme.cdn.commentBarrage)}')
57
- initializeCommentBarrage(data.data.map(item => ({
58
- nick: item.nick,
59
- mailId: item.avatar,
60
- content: item.comment,
61
- id: item.objectId
62
- })))
51
+ await fetch(url).then(async res => {
52
+ if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`)
53
+ const data = await res.json();
54
+ const regex = /<img [^>]*class="wl-emoji"[^>]*>/;
55
+ await utils.getScript('!{url_for(theme.cdn.commentBarrage)}').then(() => {
56
+ initializeCommentBarrage(data.data.data
57
+ .map(item => ({
58
+ nick: item.nick,
59
+ mailId: item.avatar,
60
+ content: item.comment.replace(regex, ''),
61
+ id: item.objectId
62
+ })))
63
+ })
63
64
  }).catch(error => console.error("An error occurred while fetching comments: ", error))
64
65
  }
@@ -47,9 +47,8 @@ script.
47
47
  }
48
48
 
49
49
  const getComment = async (asideList) => {
50
- try {
51
- const searchParams = new URLSearchParams({'site_name': "!{site}", 'limit': '6'})
52
- const res = await fetch(`!{server}/api/v2/stats/latest_comments?${searchParams}`, {method: 'GET'})
50
+ const searchParams = new URLSearchParams({'site_name': "!{site}", 'limit': '6'})
51
+ await fetch(`!{server}/api/v2/stats/latest_comments?${searchParams}`, {method: 'GET'}).then(async res => {
53
52
  const result = await res.json()
54
53
  const avatarConfig = await getSetting()
55
54
  const {mirror, params, default: defaults} = avatarConfig.frontend_conf.gravatar
@@ -65,11 +64,11 @@ script.
65
64
  }))
66
65
  utils.saveToLocal.set('artalk-newest-comments', artalk, !{theme.comment.newest_comment.storage})
67
66
  generateHtml(artalk, asideList)
68
- } catch (e) {
69
- console.error(e);
67
+ }).catch(error => {
68
+ console.error(error);
70
69
  asideList.textContent = "!{_p('newest_comment.error')}"
71
- }
72
- };
70
+ })
71
+ }
73
72
 
74
73
  const newestCommentInit = (asideList) => {
75
74
  const data = utils.saveToLocal.get('artalk-newest-comments')
@@ -72,9 +72,9 @@ script.
72
72
  </div>
73
73
  </div>
74
74
  `).join('') : "!{_p('newest_comment.zero')}"
75
- window.lazyLoadInstance && window.lazyLoadInstance.update()
76
- window.pjax && window.pjax.refresh()
77
- sco && sco.changeTimeFormat(document.querySelectorAll('.aside-list-item time'))
75
+ window.lazyLoadInstance?.update()
76
+ window.pjax?.refresh()
77
+ sco?.changeTimeFormat(document.querySelectorAll('.aside-list-item time'))
78
78
  }
79
79
 
80
80
  newestCommentInit()
@@ -5,7 +5,10 @@ script.
5
5
 
6
6
  const replacements = [
7
7
  {regex: /<img.*?src="(.*?)"?[^\>]+>/ig, replacement: '[!{_p("console.newest_comment.image")}]'},
8
- {regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, replacement: '[!{_p("console.newest_comment.link")}]'},
8
+ {
9
+ regex: /<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,
10
+ replacement: '[!{_p("console.newest_comment.link")}]'
11
+ },
9
12
  {regex: /<pre><code>.*?<\/pre>/gi, replacement: '[!{_p("console.newest_comment.code")}]'},
10
13
  {regex: /<[^>]+>/g, replacement: ""}
11
14
  ];
@@ -26,8 +29,7 @@ script.
26
29
  }
27
30
 
28
31
  const getComment = async () => {
29
- try {
30
- const res = await fetch('!{theme.waline.envId}/api/comment?type=recent&count=8', {method: 'GET'})
32
+ await fetch('!{theme.waline.envId}/api/comment?type=recent&count=8', {method: 'GET'}).then(async res => {
31
33
  const result = await res.json()
32
34
  const walineArray = result.data.map(e => {
33
35
  return {
@@ -40,10 +42,10 @@ script.
40
42
  })
41
43
  utils.saveToLocal.set('waline-newest-comment', walineArray, !{theme.comment.newest_comment.storage})
42
44
  generateHtml(walineArray)
43
- } catch (err) {
44
- console.error(err)
45
+ }).catch(error => {
46
+ console.error(error)
45
47
  $asideList.textContent = "!{_p('newest_comment.error')}"
46
- }
48
+ })
47
49
  }
48
50
 
49
51
  const generateHtml = array => {
@@ -60,9 +62,9 @@ script.
60
62
  </div>
61
63
  </div>
62
64
  `).join('') : "!{_p('newest_comment.zero')}"
63
- window.lazyLoadInstance && window.lazyLoadInstance.update()
64
- window.pjax && window.pjax.refresh()
65
- sco && sco.changeTimeFormat(document.querySelectorAll('.aside-list-item time'))
65
+ window.lazyLoadInstance?.update()
66
+ window.pjax?.refresh()
67
+ sco?.changeTimeFormat(document.querySelectorAll('.aside-list-item time'))
66
68
  }
67
69
 
68
70
  newestCommentInit()
@@ -1,17 +1,7 @@
1
1
  script.
2
- let pjaxSelectors = [
3
- 'title',
4
- '#body-wrap',
5
- '#site-config',
6
- 'meta[name="description"]',
7
- '#js-pjax',
8
- 'meta[property^="og:"]',
9
- '#config-diff'
10
- ]
11
-
12
2
  const pjax = new Pjax({
13
3
  elements: 'a:not([target="_blank"])',
14
- selectors: pjaxSelectors,
4
+ selectors: ['title','#body-wrap','#site-config','meta[name="description"]','.js-pjax','meta[property^="og:"]','#config-diff'],
15
5
  cacheBust: false,
16
6
  analytics: false,
17
7
  scrollRestoration: false
package/layout/page.pug CHANGED
@@ -31,6 +31,7 @@ block content
31
31
  default
32
32
  include includes/page/default
33
33
  if page.comment
34
+ - var comment_js = true
34
35
  include includes/widgets/third-party/comments/comment
35
36
  if page.aside
36
37
  include includes/widgets/aside/aside
package/layout/post.pug CHANGED
@@ -20,5 +20,6 @@ block content
20
20
  if theme.related_post.enable
21
21
  != related_posts(page, site.posts)
22
22
  if page.comment
23
+ - var comment_js = true
23
24
  include includes/widgets/third-party/comments/comment
24
25
  include includes/widgets/aside/aside
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -15,14 +15,15 @@ twikoo:
15
15
  file: dist/twikoo.all.min.js
16
16
  version: 1.6.32
17
17
  waline_js:
18
- name: 'waline'
18
+ name: '@waline/client'
19
19
  file: dist/waline.js
20
20
  other_name: waline
21
21
  version: 3.1.3
22
22
  waline_css:
23
- name: 'waline'
23
+ name: '@waline/client'
24
24
  file: dist/waline.css
25
25
  version: 3.1.3
26
+ other_name: waline
26
27
  valine:
27
28
  name: valine
28
29
  file: dist/Valine.min.js
@@ -95,12 +96,12 @@ medium_zoom:
95
96
  fancyapps_ui:
96
97
  name: '@fancyapps/ui'
97
98
  file: dist/fancybox/fancybox.umd.js
98
- version: 5.0.35
99
+ version: 5.0.36
99
100
  other_name: fancyapps-ui
100
101
  fancyapps_css:
101
102
  name: '@fancyapps/ui'
102
103
  file: dist/fancybox/fancybox.css
103
- version: 5.0.35
104
+ version: 5.0.36
104
105
  other_name: fancyapps-ui
105
106
  mermaid_js:
106
107
  name: mermaid
@@ -1,5 +1,5 @@
1
1
  function initializeCommentBarrage(array) {
2
- if (array === undefined) return;
2
+ if (array === []) return;
3
3
  let existingBarrage = window.currentBarrage;
4
4
 
5
5
  if (existingBarrage) {