summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-08-09 14:49:36 -0700
committerSamy Pessé <samypesse@gmail.com>2014-08-11 07:36:49 -0700
commit7e785465161ff3ca43c4e37c9caf1d94d5078bd2 (patch)
treee4f4f706fb35ae31bae455443c6d5867a20a9fb0
parentd07b9450b12634ad61c57264b277fadf47290ac7 (diff)
downloadgitbook-7e785465161ff3ca43c4e37c9caf1d94d5078bd2.zip
gitbook-7e785465161ff3ca43c4e37c9caf1d94d5078bd2.tar.gz
gitbook-7e785465161ff3ca43c4e37c9caf1d94d5078bd2.tar.bz2
Change links system for sidebar
-rw-r--r--lib/generate/config.js10
-rw-r--r--theme/templates/includes/book/summary.html27
2 files changed, 4 insertions, 33 deletions
diff --git a/lib/generate/config.js b/lib/generate/config.js
index 13a95af..a250a3c 100644
--- a/lib/generate/config.js
+++ b/lib/generate/config.js
@@ -42,16 +42,8 @@ var CONFIG = {
// Links in template (null: default, false: remove, string: new value)
"links": {
- // Link to home in the top-left corner
- "home": null,
-
- // Links in top of sidebar
- "about": null,
- "issues": null,
- "contribute": null,
-
// Custom links at top of sidebar
- "custom": {
+ "sidebar": {
//"Custom link name": "https://customlink.com"
},
diff --git a/theme/templates/includes/book/summary.html b/theme/templates/includes/book/summary.html
index c5cdb1f..d2917b9 100644
--- a/theme/templates/includes/book/summary.html
+++ b/theme/templates/includes/book/summary.html
@@ -38,32 +38,11 @@
</div>
<ul class="summary">
{% set _divider = false %}
- {% if options.links.about %}
- {% set _divider = true %}
- <li>
- <a href="{{ options.links.about }}" target="blank" class="author-link">About the author</a>
- </li>
- {% endif %}
-
- {% if options.links.issues %}
- {% set _divider = true %}
- <li>
- <a href="{{ options.links.issues }}" target="blank" class="issues-link">Questions and Issues</a>
- </li>
- {% endif %}
-
- {% if options.links.contribute %}
- {% set _divider = true %}
- <li>
- <a href="{{ options.links.contribute }}" target="blank" class="contribute-link">Contribute to this book</a>
- </li>
- {% endif %}
-
- {% if options.links.custom %}
- {% for link in options.links.custom %}
+ {% if options.links.sidebar %}
+ {% for link in options.links.sidebar %}
{% set _divider = true %}
<li>
- <a href="{{ options.links.custom[loop.key] }}" target="blank" class="custom-link">{{ loop.key }}</a>
+ <a href="{{ options.links.sidebar[loop.key] }}" target="blank" class="custom-link">{{ loop.key }}</a>
</li>
{% endfor %}
{% endif %}