mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 19:06:31 +00:00
Only convert markdown file from the navigation
This commit is contained in:
+2
-2
@@ -50,9 +50,9 @@ prog
|
||||
);
|
||||
})
|
||||
.then(function(output) {
|
||||
console.log(output);
|
||||
console.log("Done!");
|
||||
}, function(err) {
|
||||
console.log(err.stack, err);
|
||||
console.log(err.stack || err);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -71,11 +71,11 @@ var generate = function(root, output, options) {
|
||||
|
||||
// Copy file and replace markdown file
|
||||
.then(function() {
|
||||
console.log(files, summary);
|
||||
return Q.all(
|
||||
_.chain(files)
|
||||
.map(function(file) {
|
||||
if (!file) return;
|
||||
var _html = file.replace(".md", ".html");
|
||||
|
||||
// Folder
|
||||
if (file[file.length -1] == "/") {
|
||||
@@ -84,8 +84,8 @@ var generate = function(root, output, options) {
|
||||
);
|
||||
}
|
||||
|
||||
// Markdown file
|
||||
else if (path.extname(file) == ".md") {
|
||||
// Markdown file (only from the summary)
|
||||
else if (path.extname(file) == ".md" && navigation[_html] != null) {
|
||||
return tpl(file, file.replace(".md", ".html"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user