mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
fix bugs
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Note: configs in _data/melody.yml will replace configs in hexo.theme.config.
|
||||
* 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.melody && (hexo.theme.config = data.melody)
|
||||
data && data.butterfly && (hexo.theme.config = data.butterfly)
|
||||
}
|
||||
hexo.theme.config.rootConfig = rootConfig
|
||||
})
|
||||
Reference in New Issue
Block a user