diff options
author | Bo Marchman <bo.marchman@gmail.com> | 2014-07-02 23:22:59 -0400 |
---|---|---|
committer | Bo Marchman <bo.marchman@gmail.com> | 2014-07-02 23:38:14 -0400 |
commit | f7d52f0effa51a43af27b082defa6f0d952630f4 (patch) | |
tree | 82c90b965c4871f67c26a74ed68d544ab4e2e3f1 | |
parent | 16128c7e609b4ac14420080cbb7f31db5d6ffb01 (diff) | |
download | gitbook-f7d52f0effa51a43af27b082defa6f0d952630f4.zip gitbook-f7d52f0effa51a43af27b082defa6f0d952630f4.tar.gz gitbook-f7d52f0effa51a43af27b082defa6f0d952630f4.tar.bz2 |
Add custom link capability
Users can add custom links at the top of the table of contents by
adding a links.custom object to book.json. Issue #304
-rw-r--r-- | theme/templates/includes/book/summary.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/theme/templates/includes/book/summary.html b/theme/templates/includes/book/summary.html index 2f9dc3f..a177edf 100644 --- a/theme/templates/includes/book/summary.html +++ b/theme/templates/includes/book/summary.html @@ -59,6 +59,15 @@ </li> {% endif %} + {% if options.links.custom %} + {% for link in options.links.custom %} + {% set _divider = true %} + <li> + <a href="{{ options.links.custom[loop.key] }}" target="blank" class="custom-link">{{ loop.key }}</a> + </li> + {% endfor %} + {% endif %} + {% if _divider %} <li class="divider"></li> {% endif %} |