hexo-theme-volantis 5.6.0 → 5.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.7.2](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.1...v5.7.2) (2022-08-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix Chinese urlencode displaying problem in permalink ([#794](https://github.com/volantis-x/hexo-theme-volantis/issues/794)) ([677b820](https://github.com/volantis-x/hexo-theme-volantis/commit/677b8207f7e0863470ffcb8fd9f287ca7ec1e9cf))
9
+ * 加引号处理herf属性中空格导致的地址错误 ([#796](https://github.com/volantis-x/hexo-theme-volantis/issues/796)) ([2bb4043](https://github.com/volantis-x/hexo-theme-volantis/commit/2bb4043bbf58eb6080e3e5743817ad4420409937))
10
+
11
+ ## [5.7.1](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.0...v5.7.1) (2022-07-26)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * drop node 14 ([694046b](https://github.com/volantis-x/hexo-theme-volantis/commit/694046b934be663001226fedd4fb6b2535ec9d59))
17
+
18
+ ## [5.7.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.6.0...v5.7.0) (2022-07-15)
19
+
20
+
21
+ ### Features
22
+
23
+ * add LingQue.Monitor ([f6f166e](https://github.com/volantis-x/hexo-theme-volantis/commit/f6f166e0e2834bc3c765383b4c21643df9bf7dc6))
24
+ * **tag:** add pandown ([#785](https://github.com/volantis-x/hexo-theme-volantis/issues/785)) ([efc1966](https://github.com/volantis-x/hexo-theme-volantis/commit/efc1966f1b976a0c59ef5b08da41838bda0e7a83))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **artalk:** imageUploader ([#782](https://github.com/volantis-x/hexo-theme-volantis/issues/782)) ([c573d0c](https://github.com/volantis-x/hexo-theme-volantis/commit/c573d0c59b3dda882d88475ce44635647c64e4eb))
30
+
3
31
  ## [5.6.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.5.0...v5.6.0) (2022-06-30)
4
32
 
5
33
 
package/_config.yml CHANGED
@@ -46,7 +46,7 @@ cdn:
46
46
  # CDN 前缀,为空使用默认值,链接最后不加 "/",
47
47
  # 例如: https://cdn.jsdelivr.net/gh/volantis-x/volantis-x.github.io@gh-page 填写最后编译生成的源码CDN地址前缀,此路径下应该含有/js与/css目录,
48
48
  # 该配置默认值是:"https://unpkg.com/hexo-theme-volantis@"+ theme.info.theme_version +"/source"
49
- prefix: #https://npm.elemecdn.com/hexo-theme-volantis/source
49
+ prefix: #https://unpkg.com/hexo-theme-volantis/source
50
50
  # 以下配置可以覆盖 cdn.prefix,配置项的值可以为空,但是要使用CDN必须依据路径填写配置项的键
51
51
  set:
52
52
  js:
@@ -64,13 +64,13 @@ volantis_static_cdn: https://unpkg.com/volantis-static@0.0.1654736714924/
64
64
  # 全局页面字符串替换 A => B (可用于临时修改错字等)
65
65
  replace:
66
66
  - https://cdn.jsdelivr.net/npm/ => https://unpkg.com/
67
- - https://cdn.jsdelivr.net/gh/ => https://fastly.jsdelivr.net/gh/
68
- # - https://unpkg.com/ => https://npm.elemecdn.com/
67
+ - https://cdn.jsdelivr.net/gh/ => https://gcore.jsdelivr.net/gh/
68
+
69
69
 
70
70
  # dns-prefetch preconnect x-dns-prefetch-control
71
71
  dns_prefetch:
72
72
  - https://unpkg.com
73
- # - https://npm.elemecdn.com
73
+
74
74
 
75
75
  # 平滑滚动效果
76
76
  scroll_smooth: true
@@ -113,7 +113,7 @@ cover:
113
113
  home: true
114
114
  archive: true
115
115
  others: false # can be written in front-matter 'cover: true'
116
- background: https://fastly.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
116
+ background: https://gcore.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
117
117
  # background: https://bing.ioliu.cn/v1/rand?w=1920&h=1200
118
118
  logo: # https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/blog/Logo-Cover@3x.png
119
119
  title: 'Volantis'
@@ -201,7 +201,7 @@ article:
201
201
  icon: fa-solid fa-bookmark
202
202
  max_count: 5
203
203
  # 设为空则不使用文章头图
204
- placeholder_img: https://uploadbeta.com/api/pictures/random/?key=BingEverydayWallpaperPicture
204
+ placeholder_img: https://gcore.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
205
205
  # ----------------
206
206
  # 版权声明组件 (for layout: post)
207
207
  copyright:
@@ -475,7 +475,7 @@ comments:
475
475
  # Discuss
476
476
  # https://discuss.js.org
477
477
  discuss:
478
- js: https://cdn.jsdelivr.net/npm/discuss/dist/Discuss.js # 建议锁定版本
478
+ js: https://cdn.jsdelivr.net/npm/discuss/dist/discuss.js # 建议锁定版本
479
479
  serverURLs: # Discuss server address url
480
480
  # https://discuss.js.org/Quick-Start.html#path
481
481
 
@@ -1,5 +1,5 @@
1
1
  <article itemscope itemtype="http://schema.org/Article" class="article post white-box reveal md <%- theme.custom_css.body.effect.join(' ') %> article-type-<%= post.layout %>" id="<%= post.layout %>" itemscope itemprop="blogPost">
2
- <link itemprop="mainEntityOfPage" href="<%- post.permalink %>">
2
+ <link itemprop="mainEntityOfPage" href="<%- decodeURI(post.permalink) %>">
3
3
  <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
4
4
  <meta itemprop="name" content="<%- config.title %>">
5
5
  </span>
@@ -69,7 +69,7 @@
69
69
  %>
70
70
  <div class="copyright license">
71
71
  <div class="license-title"><%- post.title %></div>
72
- <div class="license-link"><a href="<%- page.permalink %>"><%- page.permalink %></a>
72
+ <div class="license-link"><a href="<%- decodeURI(page.permalink) %>"><%- decodeURI(page.permalink) %></a>
73
73
  </div>
74
74
  <div class="license-meta">
75
75
  <div class="license-meta-item">
@@ -106,7 +106,7 @@
106
106
  <blockquote>
107
107
  <% (footer_widget.copyright.content||[]).forEach(function(row){ %>
108
108
  <% if (row == 'permalink') { %>
109
- <p><%- footer_widget.copyright.permalink %><a href=<%- page.permalink %>><%- page.permalink %></a></p>
109
+ <p><%- footer_widget.copyright.permalink %><a href="<%- decodeURI(page.permalink) %>"><%- decodeURI(page.permalink) %></a></p>
110
110
  <% } else { %>
111
111
  <%- markdown(row) %>
112
112
  <% } %>
@@ -1,5 +1,5 @@
1
1
  <div class="post post-v3 white-box reveal <%- theme.custom_css.body.effect.join(' ') %>" itemscope itemtype="http://schema.org/Article" >
2
- <link itemprop="mainEntityOfPage" href="<%- post.permalink %>">
2
+ <link itemprop="mainEntityOfPage" href="<%- decodeURI(post.permalink) %>">
3
3
  <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
4
4
  <meta itemprop="name" content="<%- config.title %>">
5
5
  </span>
@@ -111,7 +111,7 @@
111
111
  <%- partial('../../_plugins/analytics/LCCounter') %>
112
112
  <% } %>
113
113
 
114
- <% if (config.google_analytics_key || config.baidu_analytics_key || config.tencent_aegis_id || config.v6_51_la) { %>
114
+ <% if (config.google_analytics_key || config.baidu_analytics_key || config.tencent_aegis_id || config.v6_51_la || config.perf_51_la) { %>
115
115
  <%- partial('../../_plugins/analytics/script') %>
116
116
  <% } %>
117
117
 
@@ -71,4 +71,12 @@ volantis.pjax.push(()=>{_hmt.push(['_trackPageview', document.location.pathname]
71
71
  })
72
72
  </script>
73
73
  <% } %>
74
-
74
+
75
+ <% if (config.perf_51_la) { %>
76
+ <script src="https://sdk.51.la/perf/js-sdk-perf.min.js" crossorigin="anonymous"></script>
77
+ <script>
78
+ volantis.js("https://sdk.51.la/perf/js-sdk-perf.min.js").then(() => {
79
+ new LingQue.Monitor().init({id:"<%= config.perf_51_la %>",sendSuspicious:true});
80
+ })
81
+ </script>
82
+ <% } %>
@@ -31,17 +31,17 @@
31
31
  imgUploader: function(file) {
32
32
  let headers = new Headers();
33
33
  headers.set('Accept', 'application/json');
34
- <% if(!!theme.comments.artalk.imgUploader?.token) { %>
35
- headers.set('Authorization', '<%= theme.comments.artalk.imgUploader?.token %>')
34
+ <% if(!!theme.comments.artalk.imageUploader?.token) { %>
35
+ headers.set('Authorization', '<%= theme.comments.artalk.imageUploader?.token %>')
36
36
  <% } %>
37
37
  let formData = new FormData();
38
38
  formData.append('file', file);
39
- return fetch('<%= theme.comments.artalk.imgUploader?.api %>',{
39
+ return fetch('<%= theme.comments.artalk.imageUploader?.api %>',{
40
40
  method: 'POST',
41
41
  body: formData,
42
42
  headers: headers
43
43
  }).then((resp) => resp.json())
44
- .then((resp) => resp.<%= theme.comments.artalk.imgUploader?.resp %>)
44
+ .then((resp) => resp.<%= theme.comments.artalk.imageUploader?.resp %>)
45
45
  },
46
46
  <% } %>
47
47
  }));
@@ -13,7 +13,7 @@
13
13
  path = defaultPath || decodeURI(window.location.pathname);
14
14
  }
15
15
 
16
- Discuss.init(Object.assign(Object.assign(<%- JSON.stringify(theme.comments.discuss) %>, {
16
+ discuss.init(Object.assign(Object.assign(<%- JSON.stringify(theme.comments.discuss) %>, {
17
17
  el: '#discuss_container',
18
18
  path: path,
19
19
  ph: placeholder
@@ -21,7 +21,7 @@
21
21
  }
22
22
  load_discuss();
23
23
  volantis.pjax.push(()=>{
24
- if (typeof Discuss == "undefined") {
24
+ if (typeof discuss == "undefined") {
25
25
  load_discuss();
26
26
  } else {
27
27
  pjax_discuss();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-volantis",
3
- "version": "5.6.0",
3
+ "version": "5.7.2",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -12,9 +12,9 @@ module.exports =(hexo) => {
12
12
  CheckError(hexo,`node.js: ${err}`);
13
13
  }
14
14
  let nodeVersion = stdout.match(/v(\d*)/)[1];
15
- if (nodeVersion<14) {
15
+ if (nodeVersion<16) {
16
16
  hexo.log.info(`node.js 版本:${stdout}`);
17
- CheckError(hexo,`node.js 版本过低,请升级至 v14.x 以上版本!`);
17
+ CheckError(hexo,`node.js 版本过低,请升级至 v16.x 及以上版本!`);
18
18
  }else{
19
19
  exec('hexo -v', (err, stdout, stderr) => {
20
20
  if (err) {
@@ -69,4 +69,4 @@ function CheckConfError(hexo,msg) {
69
69
  ${msg}
70
70
  ============================================================`);
71
71
  throw new Error('配置文件检查失败!| Configuration check failed!');
72
- }
72
+ }
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ // {% pandown type, url, pwd, fname %}
4
+ hexo.extend.tag.register('pandown', function(args) {
5
+ if(/::/g.test(args)){
6
+ args = args.join(' ').split('::');
7
+ }
8
+ else{
9
+ args = args.join(' ').split(',');
10
+ }
11
+ let type = '';
12
+ let url = '';
13
+ let pwd = '';
14
+ let fname = '';
15
+ if (args.length < 4) {
16
+ return;
17
+ } else if (args[0].trim() === 'yun') {
18
+ return '<p>对不起,pandown-tags不支持自定义</p><br><p>Sorry, pandown-tags does not support customization</p>'
19
+ } else {
20
+ type = args[0].trim();
21
+ url = args[1].trim();
22
+ pwd = args[2].trim();
23
+ fname = args[3].trim();
24
+ }
25
+ let result = '';
26
+ // js
27
+ result += '<div class="tag pandown-tags"><script type="text/javascript" src="https://unpkg.com/pandown"></script>';
28
+ //pandown
29
+ result += '<pandown type="'+type+'" url="'+url+'" pwd="'+pwd+'" fname="'+fname+'"></pandown>'
30
+ //调用
31
+ result += '<script>pandown()</script></div>'
32
+ return result;
33
+ });
@@ -123,10 +123,6 @@ if hexo-config('comments.service')=='twikoo'
123
123
  .OwO-items-image
124
124
  .OwO-item:hover
125
125
  background-color: #252627 !important
126
-
127
- if hexo-config('comments.service')=='discuss'
128
- #Discuss .D-emot
129
- background: #333841
130
126
 
131
127
  // Custom Files
132
128
  for $injects_dark in hexo-config('injects.dark')