summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-05 17:15:22 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-05 17:15:22 -0700
commit44717a3e3ed6ddec880af37049239cd0c10d2955 (patch)
treeaa77c3a1465cd8a7bd5405261f0348768ddf19ac /lib
parent6f7e3fda0292be3307dc0ad102756eb2c824ae24 (diff)
downloadgitbook-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.js13
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