diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/generate/index.js | 8 | ||||
-rw-r--r-- | lib/generate/site/index.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js index 53ae509..4804548 100644 --- a/lib/generate/index.js +++ b/lib/generate/index.js @@ -39,8 +39,8 @@ var generate = function(options) { theme: path.resolve(__dirname, '../../theme') }); - if (!options.github || !options.title || !options.input || !options.output) { - return Q.reject(new Error("Need options: github, title, input, output")); + if (!options.title || !options.input || !options.output) { + return Q.reject(new Error("Need options: title, input, output")); } if (!generators[options.generator]) { @@ -76,7 +76,7 @@ var generate = function(options) { // Generate sub-books .then(function(_langsSummary) { options.langsSummary = parse.langs(_langsSummary); - + // Generated a book for each valid entry return Q.all( _.map(options.langsSummary.list, function(entry) { @@ -84,7 +84,7 @@ var generate = function(options) { input: path.join(options.input, entry.path), output: path.join(options.output, entry.path) })); - }) + }) ); }) diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js index fab2696..4bea547 100644 --- a/lib/generate/site/index.js +++ b/lib/generate/site/index.js @@ -49,7 +49,7 @@ Generator.prototype._writeTemplate = function(tpl, options, output) { title: that.options.title, description: that.options.description, - githubAuthor: that.options.github.split("/")[0], + githubAuthor: that.options.github ? that.options.github.split("/")[0] : "", githubId: that.options.github, githubHost: that.options.githubHost, @@ -153,4 +153,4 @@ Generator.prototype.finish = function() { .then(this.writeSearchIndex); }; -module.exports = Generator;
\ No newline at end of file +module.exports = Generator; |