From 5474cbf346cebe8914ebe15e4975f521e26c2db7 Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Tue, 10 Dec 2019 07:55:43 +0800 Subject: [PATCH] fix: the config should load from source/_data too. --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 37ddd25..06cc4c0 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,8 @@ module.exports = function(hexo, pluginDir) { } this.defaultConfigFile = function(key, file) { let defaultConfig = yaml.safeLoad(this.getFileContent(file)); - this.hexo.config[key] = merge(defaultConfig[key], this.hexo.theme.config[key], this.hexo.config[key]); + let data = hexo.locals.get('data'); + this.hexo.config[key] = merge(defaultConfig[key], this.hexo.theme.config[key], this.hexo.config[key], data[key]); return this.hexo.config[key]; } }