diff --git a/include/schema/common/plugins.json b/include/schema/common/plugins.json
index 2482ae1..c095e02 100644
--- a/include/schema/common/plugins.json
+++ b/include/schema/common/plugins.json
@@ -16,6 +16,9 @@
"busuanzi": {
"$ref": "/plugin/busuanzi.json"
},
+ "cnzz": {
+ "$ref": "/plugin/cnzz.json"
+ },
"gallery": {
"$ref": "/plugin/gallery.json"
},
diff --git a/layout/common/article.jsx b/layout/common/article.jsx
index d77013b..f3f48a2 100644
--- a/layout/common/article.jsx
+++ b/layout/common/article.jsx
@@ -37,7 +37,7 @@ module.exports = class extends Component {
{page.layout !== 'page' ?
{/* Date */}
-
+
{/* Categories */}
{page.categories && page.categories.length ?
{(() => {
diff --git a/package.json b/package.json
index 39e6451..4b9fe06 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"bulma-stylus": "0.8.0",
"deepmerge": "^4.2.2",
"hexo": "^4.2.0",
- "hexo-component-inferno": "^0.1.1",
+ "hexo-component-inferno": "^0.1.2",
"hexo-log": "^1.0.0",
"hexo-pagination": "^1.0.0",
"hexo-renderer-inferno": "^0.1.3",
diff --git a/source/js/gallery.js b/source/js/gallery.js
index 1e9ecaf..6c3611b 100644
--- a/source/js/gallery.js
+++ b/source/js/gallery.js
@@ -1,4 +1,14 @@
document.addEventListener('DOMContentLoaded', () => {
+ $('.article img:not(".not-gallery-item")').each(function() {
+ // wrap images with link and add caption if possible
+ if ($(this).parent('a').length === 0) {
+ $(this).wrap('');
+ if (this.alt) {
+ $(this).after('' + this.alt + '
');
+ }
+ }
+ });
+
if (typeof $.fn.lightGallery === 'function') {
$('.article').lightGallery({ selector: '.gallery-item' });
}
diff --git a/source/js/main.js b/source/js/main.js
index f560ae1..87081a3 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -4,16 +4,6 @@
$('.columns .column-right-shadow').append($('.columns .column-right').children().clone());
}
- $('.article img:not(".not-gallery-item")').each(function() {
- // wrap images with link and add caption if possible
- if ($(this).parent('a').length === 0) {
- $(this).wrap('');
- if (this.alt) {
- $(this).after('' + this.alt + '
');
- }
- }
- });
-
if (typeof moment === 'function') {
$('.article-meta time').each(function() {
$(this).text(moment($(this).attr('datetime')).fromNow());
@@ -138,10 +128,10 @@
if (!sitehost) return false;
// handle relative url
- var data;
+ let data;
try {
data = new URL(input, 'http://' + sitehost);
- } catch (e) { return false;}
+ } catch (e) { return false; }
// handle mailto: javascript: vbscript: and so on
if (data.origin === 'null') return false;