From 6a90c9c664b4cea60b970c964fcda4a603790a7b Mon Sep 17 00:00:00 2001 From: curbengh <43627182+curbengh@users.noreply.github.com> Date: Tue, 19 Nov 2019 05:01:27 +0000 Subject: [PATCH 1/2] fix(autodiscovery): check boolean type instead of undefined --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ca52d28..cac364a 100644 --- a/index.js +++ b/index.js @@ -59,7 +59,7 @@ for (const feedType of type) { }); } -if (typeof config.autodiscovery === 'undefined') config.autodiscovery = true; +if (typeof config.autodiscovery !== 'boolean') config.autodiscovery = true; if (config.autodiscovery === true) { hexo.extend.filter.register('after_render:html', require('./lib/autodiscovery')); From 0c0f6b035fcfeb35e1c302fab186ea1bf003ba83 Mon Sep 17 00:00:00 2001 From: curbengh <43627182+curbengh@users.noreply.github.com> Date: Tue, 19 Nov 2019 05:02:30 +0000 Subject: [PATCH 2/2] refactor: 'type' defaults to array type --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index cac364a..ed75479 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const { extname } = require('path'); const config = hexo.config.feed = Object.assign({ - type: 'atom', + type: ['atom'], limit: 20, hub: '', content: true,