mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
12 lines
348 B
JavaScript
12 lines
348 B
JavaScript
/**
|
|
* Note: configs in _data/butterfly.yml will replace configs in hexo.theme.config.
|
|
*/
|
|
|
|
hexo.on('generateBefore', function () {
|
|
const rootConfig = hexo.config
|
|
if (hexo.locals.get) {
|
|
const data = hexo.locals.get('data')
|
|
data && data.butterfly && (hexo.theme.config = data.butterfly)
|
|
}
|
|
hexo.theme.config.rootConfig = rootConfig
|
|
}) |