mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
Add support for multi-languages books in JSON format
This commit is contained in:
@@ -40,6 +40,23 @@ Generator.prototype.convertFile = function(content, input) {
|
||||
});
|
||||
};
|
||||
|
||||
// Generate languages index
|
||||
Generator.prototype.langsIndex = function(langs) {
|
||||
var that = this;
|
||||
|
||||
var json = {
|
||||
langs: langs.list
|
||||
};
|
||||
|
||||
return Q()
|
||||
.then(function() {
|
||||
return fs.writeFile(
|
||||
path.join(that.options.output, "langs.json"),
|
||||
JSON.stringify(json, null, 4)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
Generator.prototype.finish = function() {
|
||||
// ignore
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user