From f7d52f0effa51a43af27b082defa6f0d952630f4 Mon Sep 17 00:00:00 2001 From: Bo Marchman Date: Wed, 2 Jul 2014 23:22:59 -0400 Subject: [PATCH 1/2] 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 --- theme/templates/includes/book/summary.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/theme/templates/includes/book/summary.html b/theme/templates/includes/book/summary.html index 2f9dc3f39..a177edf36 100644 --- a/theme/templates/includes/book/summary.html +++ b/theme/templates/includes/book/summary.html @@ -59,6 +59,15 @@ {% endif %} + {% if options.links.custom %} + {% for link in options.links.custom %} + {% set _divider = true %} +
  • + {{ loop.key }} +
  • + {% endfor %} + {% endif %} + {% if _divider %}
  • {% endif %} From ddacbbe73bb3b8a3717c4ea589b5b19514104e8c Mon Sep 17 00:00:00 2001 From: Bo Marchman Date: Wed, 2 Jul 2014 23:32:44 -0400 Subject: [PATCH 2/2] update readme with custom links --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 1aed672e6..8eb25115a 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,11 @@ Here are the options that can be stored in this file: "issues": null, "contribute": null, + // Custom links at top of sidebar + "custom": { + "Custom link name": "https://customlink.com" + }, + // Sharing links "sharing": { "google": null,