summaryrefslogtreecommitdiffstats
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
parent6f7e3fda0292be3307dc0ad102756eb2c824ae24 (diff)
downloadgitbook-44717a3e3ed6ddec880af37049239cd0c10d2955.zip
gitbook-44717a3e3ed6ddec880af37049239cd0c10d2955.tar.gz
gitbook-44717a3e3ed6ddec880af37049239cd0c10d2955.tar.bz2
Generate an index.html instead of a README.html
-rw-r--r--lib/generate/site/index.js13
-rw-r--r--theme/templates/includes/book/header.html2
-rw-r--r--theme/templates/includes/book/summary.html2
3 files changed, 6 insertions, 11 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
diff --git a/theme/templates/includes/book/header.html b/theme/templates/includes/book/header.html
index d3baf1d..c9ce5e4 100644
--- a/theme/templates/includes/book/header.html
+++ b/theme/templates/includes/book/header.html
@@ -13,5 +13,5 @@
<!-- Title -->
- <h1><a href="{{ basePath }}/README.html" >{{ title }}</a></h1>
+ <h1><a href="{{ basePath }}/" >{{ title }}</a></h1>
</div>
diff --git a/theme/templates/includes/book/summary.html b/theme/templates/includes/book/summary.html
index 996ff3d..256f94d 100644
--- a/theme/templates/includes/book/summary.html
+++ b/theme/templates/includes/book/summary.html
@@ -11,7 +11,7 @@
</li>
<li class="divider"></li>
<li data-level="0">
- <a href="{{ basePath }}/README.html"><i class="fa fa-check"></i> Introduction</a>
+ <a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
</li>
{% for item in summary.chapters %}
<li {% if item._path == _input %}class="active"{% endif %} data-level="{{ item.level }}">