hexo-theme-ayer/scripts/events/lib/merge-configs.js
alleks b3280e8d81
Some checks failed
continuous-integration/drone/push Build is failing
update
2023-03-19 19:07:30 +03:00

25 lines
543 B
JavaScript

"use strict";
const objUtil = require("../../utils/object");
const { isNotEmptyObject } = require("../../utils/object");
module.exports = (hexo) => {
if (isNotEmptyObject(hexo.config.theme_config)) {
hexo.theme.config = objUtil.merge(
{},
hexo.theme.config,
hexo.config.theme_config
);
hexo.log.info(
"[Ayer] Merge theme config from theme_config in _config.yml"
);
}
}
hexo.log.debug(
"[Ayer] Output theme config:\n",
JSON.stringify(hexo.theme.config, undefined, 2)
);
};