diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-20 17:26:13 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-20 17:26:13 +0200 |
commit | 09ff802c7ed99ce269f464baa777ece483067969 (patch) | |
tree | b52f40652e7cfb0edcb5ec0db2f1cf9daa2b2445 /lib | |
parent | a3300ad9c63c12faf9049234dff0b515edb3a870 (diff) | |
download | gitbook-09ff802c7ed99ce269f464baa777ece483067969.zip gitbook-09ff802c7ed99ce269f464baa777ece483067969.tar.gz gitbook-09ff802c7ed99ce269f464baa777ece483067969.tar.bz2 |
When using structure.readme, fix link to readme to resolve to index.html
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output/base.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/output/base.js b/lib/output/base.js index 117fd4c..868b85b 100644 --- a/lib/output/base.js +++ b/lib/output/base.js @@ -189,6 +189,11 @@ Output.prototype.onRelativeLink = function(currentPage, href) { if (to) { href = to.path; + // Change README path to be "index.html" + if (href == this.book.readme.path) { + href = 'index.html'; + } + // Recalcul as relative link href = currentPage.relative(href); |