hexo-theme-volantis 5.7.0 → 5.7.3

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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.7.3](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.2...v5.7.3) (2022-08-15)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **#781:** content_visibility: false ([0c719be](https://github.com/volantis-x/hexo-theme-volantis/commit/0c719be17e8affb28dd42c9c8bfb52e3e21d9790))
9
+ * **#793:** cdn_version: false ([cf60678](https://github.com/volantis-x/hexo-theme-volantis/commit/cf6067860312fbd6afd4ba6c14867d9ef86832fd))
10
+ * **#793:** 移除默认配置 ([4d82dff](https://github.com/volantis-x/hexo-theme-volantis/commit/4d82dff4d41c513cfa0124cbed7e42b60236d9de))
11
+ * **#798:** footer version link 404 ([a2a2d90](https://github.com/volantis-x/hexo-theme-volantis/commit/a2a2d90dc96fd00bb14cd742e0f05d253ef4ebed))
12
+
13
+ ## [5.7.2](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.1...v5.7.2) (2022-08-01)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * 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))
19
+ * 加引号处理herf属性中空格导致的地址错误 ([#796](https://github.com/volantis-x/hexo-theme-volantis/issues/796)) ([2bb4043](https://github.com/volantis-x/hexo-theme-volantis/commit/2bb4043bbf58eb6080e3e5743817ad4420409937))
20
+
21
+ ## [5.7.1](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.0...v5.7.1) (2022-07-26)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * drop node 14 ([694046b](https://github.com/volantis-x/hexo-theme-volantis/commit/694046b934be663001226fedd4fb6b2535ec9d59))
27
+
3
28
  ## [5.7.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.6.0...v5.7.0) (2022-07-15)
4
29
 
5
30
 
package/_config.yml CHANGED
@@ -46,31 +46,35 @@ 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:
53
- app: /js/app.js
53
+ #app: /js/app.js
54
54
  css:
55
- style: /css/style.css # (异步加载样式)
55
+ #style: /css/style.css # (异步加载样式)
56
56
  # 静态资源版本控制
57
57
  # 本地文件使用文件内容的hash值作为版本号(app.8c1e7c88.js) 其他为时间戳 (?time=1648684470140)
58
58
  # 建议静态资源设置标头 浏览器缓存一年边缘缓存一个月 cache-control: max-age=86400, s-maxage=31536000 如果有更新记得刷新缓存
59
- cdn_version: true
59
+ cdn_version: false
60
60
  # volantis static 静态资源文件 npm 包 CDN 地址 (后面加 "/" )
61
61
  # https://github.com/volantis-x/volantis-static
62
62
  volantis_static_cdn: https://unpkg.com/volantis-static@0.0.1654736714924/
63
63
  ########################################################################
64
+ # https://web.dev/content-visibility/
65
+ # https://www.caniuse.com/?search=content-visibility
66
+ content_visibility: false
67
+
64
68
  # 全局页面字符串替换 A => B (可用于临时修改错字等)
65
69
  replace:
66
70
  - 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/
71
+ - https://cdn.jsdelivr.net/gh/ => https://gcore.jsdelivr.net/gh/
72
+
69
73
 
70
74
  # dns-prefetch preconnect x-dns-prefetch-control
71
75
  dns_prefetch:
72
76
  - https://unpkg.com
73
- # - https://npm.elemecdn.com
77
+
74
78
 
75
79
  # 平滑滚动效果
76
80
  scroll_smooth: true
@@ -113,7 +117,7 @@ cover:
113
117
  home: true
114
118
  archive: true
115
119
  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
120
+ background: https://gcore.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
117
121
  # background: https://bing.ioliu.cn/v1/rand?w=1920&h=1200
118
122
  logo: # https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/blog/Logo-Cover@3x.png
119
123
  title: 'Volantis'
@@ -201,7 +205,7 @@ article:
201
205
  icon: fa-solid fa-bookmark
202
206
  max_count: 5
203
207
  # 设为空则不使用文章头图
204
- placeholder_img: https://uploadbeta.com/api/pictures/random/?key=BingEverydayWallpaperPicture
208
+ placeholder_img: https://gcore.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
205
209
  # ----------------
206
210
  # 版权声明组件 (for layout: post)
207
211
  copyright:
@@ -475,7 +479,7 @@ comments:
475
479
  # Discuss
476
480
  # https://discuss.js.org
477
481
  discuss:
478
- js: https://cdn.jsdelivr.net/npm/discuss/dist/Discuss.js # 建议锁定版本
482
+ js: https://cdn.jsdelivr.net/npm/discuss/dist/discuss.js # 建议锁定版本
479
483
  serverURLs: # Discuss server address url
480
484
  # https://discuss.js.org/Quick-Start.html#path
481
485
 
@@ -733,7 +737,7 @@ plugins:
733
737
 
734
738
  # https://scrollrevealjs.org/api/reveal.html
735
739
  scrollreveal:
736
- enable: true
740
+ enable: #true
737
741
  js: volantis-static/libs/scrollreveal/dist/scrollreveal.min.js # https://unpkg.com/scrollreveal@4.0.9/dist/scrollreveal.min.js
738
742
  distance: 32px
739
743
  duration: 800 # ms
@@ -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
  <% } %>
@@ -5,10 +5,14 @@
5
5
  layout = config.theme_config.footer.layout;
6
6
  }
7
7
  let theme_version = theme.info.theme_version
8
- // 未发布的 alpha 版本
9
- if (theme_version.indexOf("alpha")!=-1) {
10
- theme_version = "dev"
11
- }
8
+ // // 未发布的 alpha 版本
9
+ // if (theme_version.indexOf("alpha")!=-1) {
10
+ // theme_version = "dev"
11
+ // }
12
+ // // 从 5.7.2 以后的版本以 v开头(release-please的奇怪设定)
13
+ // else if (theme_version.indexOf("beta")==-1||theme_version.indexOf("rc")==-1) {
14
+ // theme_version = "v" + theme_version
15
+ // }
12
16
  %>
13
17
  <footer class="footer clearfix" itemscope itemtype="http://schema.org/WPFooter">
14
18
  <br><br>
@@ -39,13 +43,13 @@
39
43
  <div><%- markdown(__('footer.license')) %></div>
40
44
  <% } else if (item == 'info') { %>
41
45
  <%- __('footer.use') %>
42
- <a href="https://github.com/volantis-x/hexo-theme-volantis/tree/<%- theme_version %>" target="_blank" class="codename">Volantis</a>
46
+ <a href="https://github.com/volantis-x/hexo-theme-volantis/#<%- theme_version %>" target="_blank" class="codename">Volantis</a>
43
47
  <%- __('footer.theme') %><% if (theme.analytics.busuanzi) { %><%- __('symbol.comma') %><%- __('footer.total_views') %>
44
48
  <span id="busuanzi_value_site_pv"><i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i></span>
45
49
  <%- __('footer.times') %>
46
50
  <% } %>
47
51
  <% } else if (item == 'source') { %>
48
- <%- markdown(__('footer.site_source', '[Volantis](https://github.com/volantis-x/hexo-theme-volantis/tree/'+theme_version+')', 'GitHub', 'https://github.com/volantis-x/volantis-docs')) %>
52
+ <%- markdown(__('footer.site_source', '[Volantis](https://github.com/volantis-x/hexo-theme-volantis/#'+theme_version+')', 'GitHub', 'https://github.com/volantis-x/volantis-docs')) %>
49
53
  <% } else if (item == 'copyright') { %>
50
54
  <div class='copyright'>
51
55
  <%- markdown(theme.site_footer.copyright) %>
@@ -1,4 +1,4 @@
1
- <head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/tree/<%- theme.info.theme_version %>'>
1
+ <head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/#<%- theme.info.theme_version %>'>
2
2
  <%- meta_generator() %>
3
3
  <meta name="Volantis" content="<%- theme.info.theme_version %>">
4
4
  <meta charset="utf-8">
@@ -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>
@@ -136,7 +136,9 @@
136
136
 
137
137
  <%- partial('toc') %>
138
138
 
139
- <%- partial('content-visibility-scroll-fix') %>
139
+ <% if (theme.content_visibility) { %>
140
+ <%- partial('content-visibility-scroll-fix') %>
141
+ <% } %>
140
142
 
141
143
  <%- partial('../../_plugins/slow-network/script') %>
142
144
 
@@ -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.7.0",
3
+ "version": "5.7.3",
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
+ }
@@ -2,24 +2,26 @@
2
2
  // https://www.caniuse.com/?search=content-visibility
3
3
  // 在文章内容渲染时将每两个 <h2> 之间的内容分为一块 用 <div class="post-story"></div> 包裹起来。然后为 .post-story 声明 content-visibility: auto
4
4
  hexo.extend.filter.register('after_post_render', function (data) {
5
- let dataList = data.content.split('\n')
6
- let mydata = ``
7
- let flag = 1
8
- dataList.forEach(e => {
9
- let yy = e.replace(/<h2.*?>.*?<\/h2>/, function (str) {
10
- if (flag) {
11
- flag = 0
12
- return `<div class="story post-story">` + str
13
- } else {
14
- return `</div><div class="story post-story">` + str
15
- }
16
- })
17
- mydata += yy
18
- mydata += "\n"
19
- });
20
- if (!flag) {
21
- mydata += `</div>`
5
+ if (this.theme.config.content_visibility) {
6
+ let dataList = data.content.split('\n')
7
+ let mydata = ``
8
+ let flag = 1
9
+ dataList.forEach(e => {
10
+ let yy = e.replace(/<h2.*?>.*?<\/h2>/, function (str) {
11
+ if (flag) {
12
+ flag = 0
13
+ return `<div class="story post-story">` + str
14
+ } else {
15
+ return `</div><div class="story post-story">` + str
16
+ }
17
+ })
18
+ mydata += yy
19
+ mydata += "\n"
20
+ });
21
+ if (!flag) {
22
+ mydata += `</div>`
23
+ }
24
+ data.content = mydata
22
25
  }
23
- data.content = mydata
24
26
  return data;
25
27
  });
@@ -62,7 +62,7 @@ const getRevisionedFilePath = (filePath, revision) => {
62
62
 
63
63
  const revisioned = (filePath) => {
64
64
  if (!hexo.theme.config.cdn_version) {
65
- return;
65
+ return filePath;
66
66
  }
67
67
  let arg = process.argv[2];
68
68
  if (arg == "s" || arg == "server") {
@@ -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')
@@ -1,17 +1,19 @@
1
1
  #safearea {
2
2
  display: none
3
3
  }
4
- // https://web.dev/content-visibility/
5
- // https://www.caniuse.com/?search=content-visibility
6
- /*
7
- * Workaround for Chrome bug, part 1
8
- * Chunk rendering for all but the first article.
9
- * /layout/_partial/scripts/content-visibility-scroll-fix.ejs
10
- */
11
- .post-story + .post-story{
12
- content-visibility: auto;
13
- contain-intrinsic-size: 10px 500px;
14
- }
4
+
5
+ if hexo-config('content_visibility')
6
+ // https://web.dev/content-visibility/
7
+ // https://www.caniuse.com/?search=content-visibility
8
+ /*
9
+ * Workaround for Chrome bug, part 1
10
+ * Chunk rendering for all but the first article.
11
+ * /layout/_partial/scripts/content-visibility-scroll-fix.ejs
12
+ */
13
+ .post-story + .post-story{
14
+ content-visibility: auto;
15
+ contain-intrinsic-size: 10px 500px;
16
+ }
15
17
 
16
18
  @import '_defines/*'
17
19