Skip to content

Commit eff35b6

Browse files
authored
Update index.js
1 parent 5134cba commit eff35b6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/hexo/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var Theme = require('../theme');
2323
var Locals = require('./locals');
2424
var defaultConfig = require('./default_config');
2525
var loadDatabase = require('./load_database');
26+
var multiConfigPath = require('./multi_config_path');
2627

2728
var libDir = pathFn.dirname(__dirname);
2829
var sep = pathFn.sep;
@@ -31,6 +32,8 @@ var dbVersion = 1;
3132
function Hexo(base, args) {
3233
base = base || process.cwd();
3334
args = args || {};
35+
36+
var mcp = new multiConfigPath(this);
3437

3538
EventEmitter.call(this);
3639

@@ -53,10 +56,6 @@ function Hexo(base, args) {
5356
init: false
5457
};
5558

56-
var multiConfigPath = require('./multi_config_path')(this);
57-
this.config_path = args.config ? multiConfigPath(base, args.config)
58-
: pathFn.join(base, '_config.yml');
59-
6059
this.extend = {
6160
console: new extend.Console(),
6261
deployer: new extend.Deployer(),
@@ -90,6 +89,9 @@ function Hexo(base, args) {
9089
path: pathFn.join(base, 'db.json')
9190
});
9291

92+
this.config_path = args.config ? mcp(base, args.config)
93+
: pathFn.join(base, '_config.yml');
94+
9395
registerModels(this);
9496

9597
this.source = new Source(this);

0 commit comments

Comments
 (0)