mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-06-06 05:11:45 +08:00
first commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Note: configs in _data/melody.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)
|
||||
}
|
||||
hexo.theme.config.rootConfig = rootConfig
|
||||
})
|
||||
Reference in New Issue
Block a user