nav-next/themes/webstack/scripts/replace_config.js
2024-11-16 12:03:09 +08:00

9 lines
255 B
JavaScript

hexo.on('generateBefore', function () {
const rootConfig = hexo.config
if (hexo.locals.get) {
const data = hexo.locals.get('data')
data && data.webstack && (hexo.theme.config = data.webstack)
}
hexo.theme.config.rootConfig = rootConfig
})