diff options
Diffstat (limited to 'lib/output/website/createTemplateEngine.js')
-rw-r--r-- | lib/output/website/createTemplateEngine.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/output/website/createTemplateEngine.js b/lib/output/website/createTemplateEngine.js index 24990b6..0484396 100644 --- a/lib/output/website/createTemplateEngine.js +++ b/lib/output/website/createTemplateEngine.js @@ -71,8 +71,14 @@ function createTemplateEngine(output, currentFile) { resolveAsset: function(filePath) { filePath = LocationUtils.toAbsolute(filePath, '', ''); filePath = path.join('gitbook', filePath); + filePath = LocationUtils.relativeForFile(currentFile, filePath); - return LocationUtils.relativeForFile(currentFile, filePath); + // Use assets from parent if language book + if (book.isLanguageBook()) { + filePath = path.join('../', filePath); + } + + return LocationUtils.normalize(filePath); }, /** |