diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-21 18:08:36 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-21 18:08:36 +0100 |
commit | 5f058f2ceb77490cbbeaa56523e128e0a46a0dea (patch) | |
tree | 38affeed096afadf4b44f6d109ca34806b8f17f4 /lib/output/website.js | |
parent | 360381dd9f90a785e1ac7e8c5649215ba6220e2b (diff) | |
download | gitbook-5f058f2ceb77490cbbeaa56523e128e0a46a0dea.zip gitbook-5f058f2ceb77490cbbeaa56523e128e0a46a0dea.tar.gz gitbook-5f058f2ceb77490cbbeaa56523e128e0a46a0dea.tar.bz2 |
Disable directoryIndex for ebook generation
Diffstat (limited to 'lib/output/website.js')
-rw-r--r-- | lib/output/website.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/output/website.js b/lib/output/website.js index 32647f6..01021e5 100644 --- a/lib/output/website.js +++ b/lib/output/website.js @@ -103,8 +103,10 @@ WebsiteOutput.prototype.prepare = function() { // Relase path to an asset that.env.addFilter('resolveAsset', function(href) { - href = path.join('/gitbook', href); - return that.resolveForPage(this.ctx.file.path, href); + href = path.join('gitbook', href); + if (!this.ctx.file) return href; + + return that.resolveForPage(this.ctx.file.path, '/' + href); }); }) |