hexo-theme-volantis 5.6.0 → 5.7.0
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,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.7.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.6.0...v5.7.0) (2022-07-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add LingQue.Monitor ([f6f166e](https://github.com/volantis-x/hexo-theme-volantis/commit/f6f166e0e2834bc3c765383b4c21643df9bf7dc6))
|
|
9
|
+
* **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))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **artalk:** imageUploader ([#782](https://github.com/volantis-x/hexo-theme-volantis/issues/782)) ([c573d0c](https://github.com/volantis-x/hexo-theme-volantis/commit/c573d0c59b3dda882d88475ce44635647c64e4eb))
|
|
15
|
+
|
|
3
16
|
## [5.6.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.5.0...v5.6.0) (2022-06-30)
|
|
4
17
|
|
|
5
18
|
|
|
@@ -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.
|
|
35
|
-
headers.set('Authorization', '<%= theme.comments.artalk.
|
|
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.
|
|
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.
|
|
44
|
+
.then((resp) => resp.<%= theme.comments.artalk.imageUploader?.resp %>)
|
|
45
45
|
},
|
|
46
46
|
<% } %>
|
|
47
47
|
}));
|
package/package.json
CHANGED
|
@@ -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
|
+
});
|