This commit is contained in:
hwy0127@gmail.com
2019-06-17 21:25:18 +08:00
Unverified
parent 79971d49db
commit 5a3363e0e4
37 changed files with 2955 additions and 418 deletions

View File

@@ -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
})