From eb2d49bfe4e4f360a4c2f2b893fd064bb08e27e6 Mon Sep 17 00:00:00 2001 From: nihaoa <32973375+yuanjh6@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:44:30 +0800 Subject: [PATCH 1/4] fix bug wordcount (#654) --- includes/helpers/site.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/helpers/site.js b/includes/helpers/site.js index c29c187..1470f00 100644 --- a/includes/helpers/site.js +++ b/includes/helpers/site.js @@ -57,6 +57,9 @@ module.exports = function (hexo) { * Get the word count of a paragraph. */ hexo.extend.helper.register('word_count', function (content) { + if (typeof(content) == "undefined") { + return 0 + } content = content.replace(/<\/?[a-z][^>]*>/gi, ''); content = content.trim(); return content ? (content.match(/[\u00ff-\uffff]|[a-zA-Z]+/g) || []).length : 0; @@ -103,4 +106,4 @@ module.exports = function (hexo) { hexo.extend.helper.register('hexo_version', function (data) { return hexo.version; }); -} \ No newline at end of file +} From 9c3ad2b68102021c186e897fff4ba7a80d3238b3 Mon Sep 17 00:00:00 2001 From: Yikun Jiang Date: Sat, 28 Mar 2020 11:42:23 +0800 Subject: [PATCH 2/4] Fix wrong link (#655) `categories/Donation` --> `categories/Plugins/Donation` --- includes/specs/donate.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/specs/donate.spec.js b/includes/specs/donate.spec.js index d32a68e..71ca61d 100644 --- a/includes/specs/donate.spec.js +++ b/includes/specs/donate.spec.js @@ -55,7 +55,7 @@ const PatreonSpec = { module.exports = { [type]: 'array', - [doc]: 'Donation entries\nhttps://ppoffice.github.io/hexo-theme-icarus/categories/Donation/', + [doc]: 'Donation entries\nhttps://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Donation', [defaultValue]: DEFAULT_DONATE, '*': { [type]: 'object', @@ -69,4 +69,4 @@ module.exports = { ...PaypalSpec, ...PatreonSpec } -} \ No newline at end of file +} From f247602c448afc2baebf0ab90efd0151dcb53b15 Mon Sep 17 00:00:00 2001 From: ppoffice Date: Thu, 2 Apr 2020 10:45:03 -0400 Subject: [PATCH 3/4] chore(specs): rm canonical_url from default config --- includes/specs/meta.spec.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/includes/specs/meta.spec.js b/includes/specs/meta.spec.js index 02ed3e2..5b59fb0 100644 --- a/includes/specs/meta.spec.js +++ b/includes/specs/meta.spec.js @@ -15,11 +15,6 @@ module.exports = { [doc]: 'Meta tag specified in = style.\nE.g., name=theme-color;content=#123456 => ' } }, - canonical_url: { - [type]: 'string', - [doc]: 'canonical_url of your site', - [defaultValue]: null - }, rss: { [type]: 'string', [doc]: 'Path or URL to RSS atom.xml', From 30f33e91f2565126fd0d37d9ffdf1b052e32c52b Mon Sep 17 00:00:00 2001 From: ppoffice Date: Thu, 2 Apr 2020 10:46:19 -0400 Subject: [PATCH 4/4] chore: update package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 148fc84..93077d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-icarus", - "version": "2.6.0", + "version": "2.8.1", "private": true, "engines": { "node": ">=8.3.0"