diff options
Diffstat (limited to 'packages/gitbook/src/api/encodeGlobal.js')
-rw-r--r-- | packages/gitbook/src/api/encodeGlobal.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/gitbook/src/api/encodeGlobal.js b/packages/gitbook/src/api/encodeGlobal.js index 18ebdf0..89db629 100644 --- a/packages/gitbook/src/api/encodeGlobal.js +++ b/packages/gitbook/src/api/encodeGlobal.js @@ -36,6 +36,22 @@ function encodeGlobal(output) { summary: encodeSummary(output, book.getSummary()), /** + * Return absolute path to the root folder of the book + * @return {String} + */ + root() { + return book.getRoot(); + }, + + /** + * Return absolute path to the root folder of the book (for content) + * @return {String} + */ + contentRoot() { + return book.getContentRoot(); + }, + + /** * Check if the book is a multilingual book. * @return {Boolean} */ |