diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-29 12:46:31 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-29 12:46:31 +0200 |
commit | 9955fa8c29383dcbaaaf17e98c442d2d6b07aea6 (patch) | |
tree | f3d5005befd156f715765fdc654b3279db85d291 /lib/output/website/createTemplateEngine.js | |
parent | fb37a6bcabf9ec5d9b8b86f1641eb20275b9484d (diff) | |
download | gitbook-9955fa8c29383dcbaaaf17e98c442d2d6b07aea6.zip gitbook-9955fa8c29383dcbaaaf17e98c442d2d6b07aea6.tar.gz gitbook-9955fa8c29383dcbaaaf17e98c442d2d6b07aea6.tar.bz2 |
Use plugin assets from parent when language book
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); }, /** |