hexo-theme-volantis 5.7.6 → 5.7.8
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 +21 -0
- package/layout/_partial/_cover/dock.ejs +1 -1
- package/layout/_partial/_cover/featured.ejs +1 -1
- package/layout/_partial/_cover/focus.ejs +1 -1
- package/layout/_partial/_cover/search.ejs +1 -1
- package/layout/_partial/article.ejs +3 -3
- package/layout/_partial/footer.ejs +1 -1
- package/layout/_partial/head.ejs +6 -10
- package/layout/_partial/header.ejs +3 -3
- package/layout/_partial/meta.ejs +2 -2
- package/layout/_partial/post.ejs +1 -1
- package/layout/_partial/scripts/global.ejs +9 -3
- package/layout/_plugins/_page_plugins/index.ejs +3 -3
- package/layout/_plugins/analytics/LCCounter.ejs +1 -1
- package/layout/_plugins/aplayer/script.ejs +1 -1
- package/layout/_plugins/comments/discuss/script.ejs +1 -1
- package/layout/_plugins/highlight/prismjs/script.ejs +2 -2
- package/layout/_plugins/share/layout.ejs +1 -1
- package/layout/_widget/_pre.ejs +1 -1
- package/layout/_widget/blogger.ejs +1 -1
- package/layout/_widget/copyright.ejs +2 -2
- package/layout/_widget/grid.ejs +1 -1
- package/layout/_widget/list.ejs +1 -1
- package/layout/_widget/load.ejs +2 -2
- package/layout/_widget/qrcode.ejs +1 -1
- package/layout/_widget/references.ejs +1 -1
- package/layout/_widget/text.ejs +1 -1
- package/layout/archive.ejs +1 -1
- package/layout/friends.ejs +4 -4
- package/layout/layout.ejs +2 -2
- package/package.json +1 -1
- package/scripts/events/lib/check-configuration.js +6 -4
- package/scripts/helpers/getList.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.7.8](https://github.com/volantis-x/hexo-theme-volantis/compare/5.7.7...5.7.8) (2023-04-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **LeancloudCounter:** 修复 leancloud 配置特定 appId 值导致 custom_api_server 不生效问题 ([#861](https://github.com/volantis-x/hexo-theme-volantis/issues/861)) ([90e470d](https://github.com/volantis-x/hexo-theme-volantis/commit/90e470d8e2e0125f468acc81820ef7addc91f723))
|
|
9
|
+
|
|
10
|
+
## [5.7.7](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.6...5.7.7) (2022-11-24)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **#824:** 边界条件 ([13f4e0e](https://github.com/volantis-x/hexo-theme-volantis/commit/13f4e0e6be464519a1ea3e020b5da1b1396c1254))
|
|
16
|
+
* yml string to list ([11ab545](https://github.com/volantis-x/hexo-theme-volantis/commit/11ab545b52967e639938be00f78cc6bdefa885d4))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Performance Improvements
|
|
20
|
+
|
|
21
|
+
* **debug:** description 的配置检查改为warn警告并使用默认值 [#801](https://github.com/volantis-x/hexo-theme-volantis/issues/801) ([f82f547](https://github.com/volantis-x/hexo-theme-volantis/commit/f82f54718b081439ea40e5a105ba81be15c60de0))
|
|
22
|
+
* **readmore:** readmore:false 优先级高于 auto_excerpt:true ([302bf4e](https://github.com/volantis-x/hexo-theme-volantis/commit/302bf4e101689c0df9e0b8cbb1778dd18a8d5567))
|
|
23
|
+
|
|
3
24
|
## [5.7.6](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.5...v5.7.6) (2022-09-05)
|
|
4
25
|
|
|
5
26
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class='menu navigation'>
|
|
15
15
|
<div class='list-h'>
|
|
16
16
|
<% if (theme.cover.features) { %>
|
|
17
|
-
<% (theme.cover.features
|
|
17
|
+
<% getList(theme.cover.features).forEach(function(value){ %>
|
|
18
18
|
<a href="<%= url_for(value.url) %>"
|
|
19
19
|
<% if (value.rel) { %>
|
|
20
20
|
rel="<%- value.rel %>"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class='menu navigation'>
|
|
15
15
|
<div class='list-h'>
|
|
16
16
|
<% if (theme.cover.features) { %>
|
|
17
|
-
<% (theme.cover.features
|
|
17
|
+
<% getList(theme.cover.features).forEach(function(value){ %>
|
|
18
18
|
<a href="<%= url_for(value.url) %>"
|
|
19
19
|
<% if (value.rel) { %>
|
|
20
20
|
rel="<%- value.rel %>"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class='menu navigation'>
|
|
15
15
|
<div class='list-h'>
|
|
16
16
|
<% if (theme.cover.features) { %>
|
|
17
|
-
<% (theme.cover.features
|
|
17
|
+
<% getList(theme.cover.features).forEach(function(value){ %>
|
|
18
18
|
<a href="<%= url_for(value.url) %>"
|
|
19
19
|
<% if (value.rel) { %>
|
|
20
20
|
rel="<%- value.rel %>"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div class='menu navigation'>
|
|
23
23
|
<div class='list-h'>
|
|
24
24
|
<% if (theme.cover.features) { %>
|
|
25
|
-
<% (theme.cover.features
|
|
25
|
+
<% getList(theme.cover.features).forEach(function(value){ %>
|
|
26
26
|
<a href="<%= url_for(value.url) %>"
|
|
27
27
|
<% if (value.rel) { %>
|
|
28
28
|
rel="<%- value.rel %>"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</section>
|
|
34
34
|
<section class='body'>
|
|
35
35
|
<ul>
|
|
36
|
-
<% (page.references
|
|
36
|
+
<% getList(page.references).forEach(function(row){ %>
|
|
37
37
|
<li>
|
|
38
38
|
<a href="<%- url_for(row.url) %>" rel="external nofollow noopener noreferrer" target="_blank">
|
|
39
39
|
<%- row.title || url_for(row.url) %>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<% } else { %>
|
|
105
105
|
<div class='copyright'>
|
|
106
106
|
<blockquote>
|
|
107
|
-
<% (footer_widget.copyright.content
|
|
107
|
+
<% getList(footer_widget.copyright.content).forEach(function(row){ %>
|
|
108
108
|
<% if (row == 'permalink') { %>
|
|
109
109
|
<p><%- footer_widget.copyright.permalink %><a href="<%- decodeURI(page.permalink) %>"><%- decodeURI(page.permalink) %></a></p>
|
|
110
110
|
<% } else { %>
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
<% if (['post'].includes(page.layout) && footer_widget.donate && footer_widget.donate.enable == true) { %>
|
|
120
120
|
<div class='donate'>
|
|
121
121
|
<div class='imgs'>
|
|
122
|
-
<% (footer_widget.donate.images
|
|
122
|
+
<% getList(footer_widget.donate.images).forEach(function(url){ %>
|
|
123
123
|
<img src='<%- url_for(url) %>'>
|
|
124
124
|
<% }) %>
|
|
125
125
|
</div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<% if (item == 'social') { %>
|
|
21
21
|
<br>
|
|
22
22
|
<div class="social-wrapper" itemprop="about" itemscope itemtype="http://schema.org/Thing">
|
|
23
|
-
<% (theme.site_footer.social
|
|
23
|
+
<% getList(theme.site_footer.social).forEach(function(value){ %>
|
|
24
24
|
<% if (value.url && (value.icon || value.img || value.avatar)) { %>
|
|
25
25
|
<a href="<%= url_for(value.url) %>"
|
|
26
26
|
class="social <%- value.icon %> flat-btn"
|
package/layout/_partial/head.ejs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- 渲染优化 -->
|
|
9
9
|
<%_ if (theme.dns_prefetch && theme.dns_prefetch.length){ _%>
|
|
10
10
|
<meta http-equiv='x-dns-prefetch-control' content='on' />
|
|
11
|
-
<%_ (
|
|
11
|
+
<%_ getList(theme.dns_prefetch).forEach(function(item){ _%>
|
|
12
12
|
<link rel='dns-prefetch' href='<%- item %>'>
|
|
13
13
|
<link rel="preconnect" href="<%- item %>" crossorigin>
|
|
14
14
|
<%_ }) _%>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<meta content="telephone=no" name="format-detection">
|
|
27
27
|
<!-- import head_begin begin -->
|
|
28
28
|
<%_ if (config.import && config.import.head_begin){ _%>
|
|
29
|
-
<%_ (
|
|
29
|
+
<%_ getList(config.import.head_begin).forEach(function(item){ _%>
|
|
30
30
|
<%- item %>
|
|
31
31
|
<%_ }) _%>
|
|
32
32
|
<%_ } _%>
|
|
@@ -41,13 +41,9 @@
|
|
|
41
41
|
<%- generate_preload_fontfamily(theme) %>
|
|
42
42
|
<!-- feed -->
|
|
43
43
|
<%_ if (config.feed && config.feed.path){ _%>
|
|
44
|
-
<%_
|
|
45
|
-
<%- feed_tag(
|
|
46
|
-
<%_ }
|
|
47
|
-
<%_ ([...config.feed.path]).forEach(function(item){ _%>
|
|
48
|
-
<%- feed_tag(item, {title: config.title}) %>
|
|
49
|
-
<%_ }) _%>
|
|
50
|
-
<%_ } _%>
|
|
44
|
+
<%_ getList(config.feed.path).forEach(function(item){ _%>
|
|
45
|
+
<%- feed_tag(item, {title: config.title}) %>
|
|
46
|
+
<%_ }) _%>
|
|
51
47
|
<%_ } _%>
|
|
52
48
|
<!-- 页面元数据 -->
|
|
53
49
|
<%- generate_title(config, theme, page) %>
|
|
@@ -72,7 +68,7 @@
|
|
|
72
68
|
<%- partial('scripts/global') %>
|
|
73
69
|
<!-- import head_end begin -->
|
|
74
70
|
<%_ if (config.import && config.import.head_end){ _%>
|
|
75
|
-
<%_ (
|
|
71
|
+
<%_ getList(config.import.head_end).forEach(function(item){ _%>
|
|
76
72
|
<%- item %>
|
|
77
73
|
<%_ }) _%>
|
|
78
74
|
<%_ } _%>
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
</a>
|
|
78
78
|
<% if (value.rows) { %>
|
|
79
79
|
<ul class="list-v">
|
|
80
|
-
<% value.rows.forEach(function(value){ %>
|
|
80
|
+
<% getList(value.rows).forEach(function(value){ %>
|
|
81
81
|
<% menu(value, type) %>
|
|
82
82
|
<%})%>
|
|
83
83
|
</ul>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</li>
|
|
86
86
|
<% } %>
|
|
87
87
|
<% } %>
|
|
88
|
-
<% menu_list.forEach(function(value){ %>
|
|
88
|
+
<% getList(menu_list).forEach(function(value){ %>
|
|
89
89
|
<% menu(value, 'pc') %>
|
|
90
90
|
<% }) %>
|
|
91
91
|
</ul>
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
<li>
|
|
107
107
|
<a class="s-menu fa-solid fa-bars fa-fw" target="_self" href="/" onclick="return false;" title="menu"></a>
|
|
108
108
|
<ul class="menu-phone list-v navigation white-box">
|
|
109
|
-
<% menu_list.forEach(function(value){ %>
|
|
109
|
+
<% getList(menu_list).forEach(function(value){ %>
|
|
110
110
|
<% menu(value, 'mobile') %>
|
|
111
111
|
<% }) %>
|
|
112
112
|
</ul>
|
package/layout/_partial/meta.ejs
CHANGED
|
@@ -35,7 +35,7 @@ if (post.bottom_meta == false) {
|
|
|
35
35
|
<%- post.title %>
|
|
36
36
|
</h1>
|
|
37
37
|
<div class='new-meta-box'>
|
|
38
|
-
<% (topMetas).forEach(function(meta) { %>
|
|
38
|
+
<% getList(topMetas).forEach(function(meta) { %>
|
|
39
39
|
<% if (meta in theme.article.body.meta_library){ %>
|
|
40
40
|
<%- partial('../_meta/' + meta, {post: post}) %>
|
|
41
41
|
<% } %>
|
|
@@ -53,7 +53,7 @@ if (post.bottom_meta == false) {
|
|
|
53
53
|
<% } else if (position == 'bottom') { %>
|
|
54
54
|
<div class='article-meta' id="bottom">
|
|
55
55
|
<div class='new-meta-box'>
|
|
56
|
-
<% (bottomMetas).forEach(function(meta){ %>
|
|
56
|
+
<% getList(bottomMetas).forEach(function(meta){ %>
|
|
57
57
|
<% if (meta in theme.article.body.meta_library) { %>
|
|
58
58
|
<%- partial('../_meta/' + meta, {post: post}) %>
|
|
59
59
|
<% } %>
|
package/layout/_partial/post.ejs
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
showCat = true;
|
|
22
22
|
}
|
|
23
23
|
let showReadmore = false;
|
|
24
|
-
if (theme.article.preview.readmore == 'always' ||
|
|
24
|
+
if (theme.article.preview.readmore == 'always' || ((post.readmore != false) && (theme.article.preview.auto_excerpt || post.excerpt || post.description || post.link))) {
|
|
25
25
|
showReadmore = true;
|
|
26
26
|
}
|
|
27
27
|
%>
|
|
@@ -363,8 +363,11 @@
|
|
|
363
363
|
volantis.requestAnimationFrame(loop)
|
|
364
364
|
}
|
|
365
365
|
volantis.scroll.handleScrollEvents()
|
|
366
|
+
volantis.scroll.ele = null;
|
|
366
367
|
// 触发页面滚动至目标元素位置
|
|
367
|
-
volantis.scroll.to = (ele, option = {}) =>{
|
|
368
|
+
volantis.scroll.to = (ele, option = {}) => {
|
|
369
|
+
if (!ele) return;
|
|
370
|
+
volantis.scroll.ele = ele;
|
|
368
371
|
// 默认配置
|
|
369
372
|
opt = {
|
|
370
373
|
top: ele.getBoundingClientRect().top + document.documentElement.scrollTop,
|
|
@@ -390,8 +393,11 @@
|
|
|
390
393
|
// 用于处理 lazyload 引起的 cls 导致的定位失败问题
|
|
391
394
|
// option.observer = false
|
|
392
395
|
if (option.observer) {
|
|
393
|
-
setTimeout(()=>{
|
|
394
|
-
volantis.scroll.
|
|
396
|
+
setTimeout(() => {
|
|
397
|
+
if (volantis.scroll.ele != ele) {
|
|
398
|
+
return
|
|
399
|
+
}
|
|
400
|
+
volantis.scroll.unengine.push(() => {
|
|
395
401
|
let me = ele.getBoundingClientRect().top
|
|
396
402
|
if(!(me >= -option.observerDic && me <= option.observerDic)){
|
|
397
403
|
volantis.scroll.to(ele, option)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%_
|
|
2
|
-
(page.plugins
|
|
2
|
+
getList(page.plugins).forEach(function(item){
|
|
3
3
|
try {
|
|
4
4
|
if (typeof item == "string") { _%>
|
|
5
5
|
<%- partial( item + "/index") %>
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
没有找到页面插件:${item}
|
|
14
14
|
请检查是否存在该插件,或者检查插件名称是否正确:${item}
|
|
15
15
|
出问题的页面:${page.path}
|
|
16
|
-
see: https://volantis.js.org/
|
|
16
|
+
see: https://volantis.js.org/v6/page-settings/#页面插件-page-plugins
|
|
17
17
|
================================================================================
|
|
18
18
|
There is no page plugin: ${item}
|
|
19
19
|
Please check if the plugin exists, or check the plugin name is correct: ${item}
|
|
20
20
|
The page that has problem: ${page.path}
|
|
21
|
-
see: https://volantis.js.org/
|
|
21
|
+
see: https://volantis.js.org/v6/page-settings/#页面插件-page-plugins
|
|
22
22
|
=================================================================================`);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
|
|
187
187
|
refreshCounter() {
|
|
188
|
-
var api_server = this.
|
|
188
|
+
var api_server = this.custom_api_server || `https://${ this.app_id.slice(0, 8).toLowerCase() }.api.lncldglobal.com`;
|
|
189
189
|
if (api_server) {
|
|
190
190
|
this.fetchData(api_server);
|
|
191
191
|
} else {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
const aplayerItem = item.aplayer; if(!aplayerItem) return;
|
|
27
27
|
const rightAplayerCheck = '<%= theme.rightmenu.layout.includes("music") %>' === 'true'
|
|
28
28
|
&& item.meta.id === '<%= theme.plugins.aplayer.id %>';
|
|
29
|
-
if(rightAplayerCheck) RightMenuAplayer.checkAPlayer();
|
|
29
|
+
if(rightAplayerCheck && typeof RightMenuAplayer !="undefined") RightMenuAplayer.checkAPlayer();
|
|
30
30
|
if(aplayerItem.events.events.play.every(item => {return item.name !== 'messagePlay'})) {
|
|
31
31
|
aplayerItem.on('play', function messagePlay() {
|
|
32
32
|
let index = aplayerItem.list.index;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
volantis.layoutHelper("comments",`<div id="discuss_container"
|
|
2
|
+
volantis.layoutHelper("comments",`<div id="discuss_container"></div>`)
|
|
3
3
|
function load_discuss() {
|
|
4
4
|
if(!document.querySelectorAll("#discuss_container")[0])return;
|
|
5
5
|
volantis.js("<%- theme.comments.discuss.js %>", pjax_discuss)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<% (theme.plugins.prismjs.js
|
|
1
|
+
<% getList(theme.plugins.prismjs.js).forEach(function(item) { %>
|
|
2
2
|
<%- js(item) %>
|
|
3
3
|
<% }) %>
|
|
4
|
-
<% (theme.plugins.prismjs.css
|
|
4
|
+
<% getList(theme.plugins.prismjs.css).forEach(function(item) { %>
|
|
5
5
|
<%- css(item) %>
|
|
6
6
|
<% }) %>
|
|
7
7
|
<script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="new-meta-item share -mob-share-list">
|
|
2
2
|
<div class="-mob-share-list share-body">
|
|
3
|
-
<% (theme.article.body.meta_library.share
|
|
3
|
+
<% getList(theme.article.body.meta_library.share).forEach(function(item){ %>
|
|
4
4
|
<% if (item.id == 'qrcode'){ %>
|
|
5
5
|
<% var src = qrcode(url,{margin:1,size:8}); %>
|
|
6
6
|
<div class='hoverbox'>
|
package/layout/_widget/_pre.ejs
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<% } %>
|
|
29
29
|
<% if (item.social && item.social.length > 0) { %>
|
|
30
30
|
<div class="social-wrapper">
|
|
31
|
-
<% (item.social
|
|
31
|
+
<% getList(item.social).forEach(function(value){ %>
|
|
32
32
|
<% if (value.url && (value.icon || value.img || value.avatar)) { %>
|
|
33
33
|
<a href="<%= url_for(value.url) %>"
|
|
34
34
|
class="social <%- value.icon %> flat-btn"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class='content'>
|
|
4
4
|
<% if (item.blockquote == true) { %>
|
|
5
5
|
<blockquote>
|
|
6
|
-
<% (item.content
|
|
6
|
+
<% getList(item.content).forEach(function(row){ %>
|
|
7
7
|
<% if (row == 'permalink') { %>
|
|
8
8
|
<p><%- item.permalink %><a href=<%- page.permalink %>><%- page.permalink %></a></p>
|
|
9
9
|
<% } else { %>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<% }) %>
|
|
13
13
|
</blockquote>
|
|
14
14
|
<% } else { %>
|
|
15
|
-
<% (item.content
|
|
15
|
+
<% getList(item.content).forEach(function(row){ %>
|
|
16
16
|
<% if (row == 'permalink') { %>
|
|
17
17
|
<p><%- item.permalink %><a href=<%- page.permalink %>><%- page.permalink %></a></p>
|
|
18
18
|
<% } else { %>
|
package/layout/_widget/grid.ejs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
5
|
<div class="grid navigation<%- item.fixed ? ' fixed' : '' %>">
|
|
6
|
-
<% (item.rows
|
|
6
|
+
<% getList(item.rows).forEach(function(row){ %>
|
|
7
7
|
<a class="flat-box" href="<%- url_for(row.url) %>"
|
|
8
8
|
<% if (row.rel) { %>
|
|
9
9
|
rel="<%- row.rel %>"
|
package/layout/_widget/list.ejs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
5
|
<ul class="list entry navigation">
|
|
6
|
-
<% (item.rows
|
|
6
|
+
<% getList(item.rows).forEach(function(row){ %>
|
|
7
7
|
<li><a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>"
|
|
8
8
|
<% if (row.rel) { %>
|
|
9
9
|
rel="<%- row.rel %>"
|
package/layout/_widget/load.ejs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%
|
|
2
2
|
let widget_library_temp = [];
|
|
3
3
|
%>
|
|
4
|
-
<% (widgets
|
|
4
|
+
<% getList(widgets).forEach(function(widget){ %>
|
|
5
5
|
<% if (theme.sidebar.widget_library && (widget in theme.sidebar.widget_library)){ %>
|
|
6
6
|
<% let w = theme.sidebar.widget_library[widget]; w.id = widget; %>
|
|
7
7
|
<% if(w.sticky) { %>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<%
|
|
24
24
|
let widget_pjax_length = 0;
|
|
25
|
-
page.sidebar.forEach(function(e){
|
|
25
|
+
getList(page.sidebar).forEach(function(e){
|
|
26
26
|
if (e&&theme.sidebar.widget_library&&theme.sidebar.widget_library[e]) {
|
|
27
27
|
let widget_pjax_flag = theme.sidebar.widget_library[e].pjaxReload
|
|
28
28
|
let widget_stickys = theme.sidebar.widget_library[e].sticky
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<section class="widget <%- item.class %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content article-entry'>
|
|
5
|
-
<% (item.images
|
|
5
|
+
<% getList(item.images).forEach(function(url){ %>
|
|
6
6
|
<img src='<%- url_for(url) %>'
|
|
7
7
|
<% if (item.height) { %>
|
|
8
8
|
height='<%- item.height %>'
|
package/layout/_widget/text.ejs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<section class="widget <%- item.class %> <%- page.widget_platform %> <%- page.widget_pjax %>">
|
|
3
3
|
<%- partial('header', {item: item}) %>
|
|
4
4
|
<div class='content'>
|
|
5
|
-
<% (item.content
|
|
5
|
+
<% getList(item.content).forEach(function(row){ %>
|
|
6
6
|
<%- markdown(row) %>
|
|
7
7
|
<% }) %>
|
|
8
8
|
</div>
|
package/layout/archive.ejs
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<% if (post.icon) { %>
|
|
27
27
|
<i class="<%- post.icon %>" aria-hidden="true"></i>
|
|
28
28
|
<% } %>
|
|
29
|
-
<% (post.icons
|
|
29
|
+
<% getList(post.icons).forEach(function(icon){ %>
|
|
30
30
|
<i class="<%- icon %>" aria-hidden="true"></i>
|
|
31
31
|
<% }) %>
|
|
32
32
|
</a>
|
package/layout/friends.ejs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<%- partial('_partial/meta',{post: page, position: 'top'}) %>
|
|
5
5
|
<%- page.excerpt %>
|
|
6
6
|
<% if (site.data.friends){ %>
|
|
7
|
-
<% site.data.friends.forEach((group, i) => { %>
|
|
7
|
+
<% getList(site.data.friends).forEach((group, i) => { %>
|
|
8
8
|
<div class='friends-group'>
|
|
9
9
|
<br>
|
|
10
10
|
<h2 class='friend-header'>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<%} %>
|
|
16
16
|
<% if (theme.pages.friends.layout_scheme == 'traditional') { %>
|
|
17
17
|
<div class='friend-content'>
|
|
18
|
-
<% (group.items
|
|
18
|
+
<% getList(group.items).forEach(function(item){ %>
|
|
19
19
|
<% if (item.url && item.title) { %>
|
|
20
20
|
<a class='friend-card'
|
|
21
21
|
target="_blank" rel="external noopener noreferrer" href="<%- url_for(item.url || '/') %>">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<p class="friend-name"><%- item.title %></p>
|
|
29
29
|
<% if (item.keywords) { %>
|
|
30
30
|
<div class='friend-tags-wrapper'>
|
|
31
|
-
<% (item.keywords
|
|
31
|
+
<% getList(item.keywords).forEach(function(keyword){ %>
|
|
32
32
|
<p class="tags"><i class="fa-solid fa-hashtag fa-fw" aria-hidden="true"></i><%= keyword %></p>
|
|
33
33
|
<% }) %>
|
|
34
34
|
</div>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</div>
|
|
46
46
|
<% } else { %>
|
|
47
47
|
<div class='simpleuser-group'>
|
|
48
|
-
<% (group.items
|
|
48
|
+
<% getList(group.items).forEach(function(item){ %>
|
|
49
49
|
<% if (item.url && item.title) { %>
|
|
50
50
|
<a class="simpleuser" target="_blank" rel="external noopener noreferrer" href="<%- url_for(item.url || '/') %>">
|
|
51
51
|
<img src="<%- item.avatar || (theme.plugins.lazyload && theme.plugins.lazyload.loadingImg) %>"/>
|
package/layout/layout.ejs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<body itemscope itemtype="http://schema.org/WebPage">
|
|
6
6
|
<!-- import body_begin begin-->
|
|
7
7
|
<%_ if (config.import && config.import.body_begin){ _%>
|
|
8
|
-
<%_ (
|
|
8
|
+
<%_ getList(config.import.body_begin).forEach(function(item){ _%>
|
|
9
9
|
<%- item %>
|
|
10
10
|
<%_ }) _%>
|
|
11
11
|
<%_ } _%>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</div>
|
|
34
34
|
<!-- import body_end begin-->
|
|
35
35
|
<%_ if (config.import && config.import.body_end){ _%>
|
|
36
|
-
<%_ (
|
|
36
|
+
<%_ getList(config.import.body_end).forEach(function(item){ _%>
|
|
37
37
|
<%- item %>
|
|
38
38
|
<%_ }) _%>
|
|
39
39
|
<%_ } _%>
|
package/package.json
CHANGED
|
@@ -3,17 +3,19 @@ module.exports =(hexo) => {
|
|
|
3
3
|
let config = hexo.config;
|
|
4
4
|
let themeConfig = hexo.theme.config;
|
|
5
5
|
if (!config.title) {
|
|
6
|
-
|
|
6
|
+
config.title = `Volantis`
|
|
7
|
+
hexo.log.warn(`title 未配置!
|
|
7
8
|
请在站点配置 _config.yml 中配置 title
|
|
8
9
|
see: https://hexo.io/zh-cn/docs/configuration
|
|
9
|
-
title is not configured!`
|
|
10
|
+
title is not configured!`)
|
|
10
11
|
}
|
|
11
12
|
if (!config.description) {
|
|
12
|
-
|
|
13
|
+
config.description = `Volantis 是一个功能丰富、高度模块化的 Hexo 博客主题。得益于其强大的模块化特性,您可以轻松搭建一个极简风格的博客,也可以仿照官网搭建一个多人协作的、包含文档模块的大体量综合型博客。`
|
|
14
|
+
hexo.log.warn(`description 未配置!
|
|
13
15
|
请在站点配置 _config.yml 中配置 description
|
|
14
16
|
description主要用于SEO,告诉搜索引擎一个关于您站点的简单描述,通常建议在其中包含您网站的关键词。
|
|
15
17
|
see: https://hexo.io/zh-cn/docs/configuration
|
|
16
|
-
description is not configured!`
|
|
18
|
+
description is not configured!`);
|
|
17
19
|
}
|
|
18
20
|
if (themeConfig?.search?.service===`google`||themeConfig?.search?.service===`algolia`||themeConfig?.search?.service===`azure`||themeConfig?.search?.service===`baidu`) {
|
|
19
21
|
return `原 google, algolia, azure, baidu 站内搜索 系祖传代码, 且文档丢失, 不便后续维护 在 5.0 版本被移除
|