hexo-theme-ayer/scripts/events/lib/merge-configs.js
alleks adccb1fb64
All checks were successful
continuous-integration/drone/push Build is passing
update
2023-03-19 19:16:50 +03:00

23 lines
538 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)
);
};