summaryrefslogtreecommitdiffstats
path: root/lib/generate/index.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@friendco.de>2014-03-31 19:25:14 -0700
committerAaron O'Mullan <aaron.omullan@friendco.de>2014-03-31 19:25:14 -0700
commita6d18e89dfe826ffb55da6c812a34f403a9e98d5 (patch)
tree45715c26d529dd3ecae7026bef1c585e547380fd /lib/generate/index.js
parentec570ca68d615bcecff74b37c52897ee299e1463 (diff)
downloadgitbook-a6d18e89dfe826ffb55da6c812a34f403a9e98d5.zip
gitbook-a6d18e89dfe826ffb55da6c812a34f403a9e98d5.tar.gz
gitbook-a6d18e89dfe826ffb55da6c812a34f403a9e98d5.tar.bz2
Symlink README.html to index.html for book output
Diffstat (limited to 'lib/generate/index.js')
-rw-r--r--lib/generate/index.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js
index 4b81d8f..35ee4f4 100644
--- a/lib/generate/index.js
+++ b/lib/generate/index.js
@@ -101,7 +101,7 @@ var generate = function(root, output, options) {
summary: summary,
allNavigation: navigation
}
- })
+ });
})
// Copy file and replace markdown file
@@ -133,7 +133,15 @@ var generate = function(root, output, options) {
}
})
.value()
- )
+ );
+ })
+
+ // Symlink index.html to README.html
+ .then(function() {
+ return fs.symlink(
+ path.join(output, 'README.html'),
+ path.join(output, 'index.html')
+ );
})
// Copy assets
@@ -142,9 +150,9 @@ var generate = function(root, output, options) {
path.join(__dirname, "../../assets/static"),
path.join(output, "gitbook")
);
- })
+ });
};
module.exports = {
folder: generate
-} \ No newline at end of file
+};