mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 18:43:29 +00:00
Change links system for sidebar
This commit is contained in:
@@ -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"
|
||||
},
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user