diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-05 17:15:22 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-05 17:15:22 -0700 |
commit | 44717a3e3ed6ddec880af37049239cd0c10d2955 (patch) | |
tree | aa77c3a1465cd8a7bd5405261f0348768ddf19ac /lib | |
parent | 6f7e3fda0292be3307dc0ad102756eb2c824ae24 (diff) | |
download | gitbook-44717a3e3ed6ddec880af37049239cd0c10d2955.zip gitbook-44717a3e3ed6ddec880af37049239cd0c10d2955.tar.gz gitbook-44717a3e3ed6ddec880af37049239cd0c10d2955.tar.bz2 |
Generate an index.html instead of a README.html
Diffstat (limited to 'lib')
-rw-r--r-- | lib/generate/site/index.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js index 487b6d6..bf711d3 100644 --- a/lib/generate/site/index.js +++ b/lib/generate/site/index.js @@ -33,6 +33,7 @@ Generator.prototype.convertFile = function(content, _input) { var progress = parse.progress(this.options.navigation, _input); _output = _input.replace(".md", ".html"); + if (_output == "README.html") _output = "index.html"; var input = path.join(this.options.input, _input); var output = path.join(this.options.output, _output); @@ -78,15 +79,9 @@ Generator.prototype.finish = function() { var that = this; return fs.copy( - path.join(that.options.output, 'README.html'), - path.join(that.options.output, 'index.html') - ) - .then(function() { - return fs.copy( - path.join(that.options.theme, "assets"), - path.join(that.options.output, "gitbook") - ); - }); + path.join(that.options.theme, "assets"), + path.join(that.options.output, "gitbook") + ); }; module.exports = Generator;
\ No newline at end of file |