diff --git a/lib/commands/start.js b/lib/commands/start.js index d04dc8e..74b2247 100644 --- a/lib/commands/start.js +++ b/lib/commands/start.js @@ -46,9 +46,11 @@ module.exports = function (path, configFile, port) { ? util.read(util.resolve(ctx, config.template)) : config.template } else if (pkg.docsify) { + const tpl = pkg.docsify.template + config = pkg.docsify - config.template = util.exists(util.resolve(ctx, pkg.docsify.template)) - ? util(pkg.docsify.template) + config.template = (tpl && util.exists(util.resolve(ctx, tpl))) + ? util.read(tpl) : defaultConfig.template } diff --git a/package.json b/package.json index c9fd1d7..4b5f19f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "connect-livereload": "^0.6.0", "cp-file": "^4.1.1", "docsify": ">=3", - "docsify-server-renderer": "^4.0.1", + "docsify-server-renderer": "^4.1.0", "fs-extra": "^2.1.2", "livereload": "^0.6.2", "open": "^0.0.5",