feat: overwrite _config.yml using _config.yml in folder source/_data
This commit is contained in:
parent
7a93270b46
commit
807feaa99c
|
@ -0,0 +1,10 @@
|
||||||
|
hexo.on('generateBefore', function () {
|
||||||
|
const rootConfig = hexo.config;
|
||||||
|
if (hexo.locals.get) {
|
||||||
|
const data = hexo.locals.get('data');
|
||||||
|
if (data && data._config) {
|
||||||
|
hexo.theme.config = data._config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hexo.theme.config.rootConfig = rootConfig;
|
||||||
|
});
|
Loading…
Reference in New Issue