summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-05-01 18:53:49 +0200
committerSamy Pessé <samypesse@gmail.com>2014-05-01 18:53:49 +0200
commit6d276d1e7941552d405a22eb1b7c644eb63b07fe (patch)
tree83a456ecfd28d1f3e4744618c50791b02f8bddd9
parent6a3a369b3ef57c4ef68d87a2fca14fac1017b996 (diff)
downloadgitbook-6d276d1e7941552d405a22eb1b7c644eb63b07fe.zip
gitbook-6d276d1e7941552d405a22eb1b7c644eb63b07fe.tar.gz
gitbook-6d276d1e7941552d405a22eb1b7c644eb63b07fe.tar.bz2
Add option to remove home link
-rw-r--r--README.md6
-rw-r--r--theme/templates/includes/book/header.html4
2 files changed, 8 insertions, 2 deletions
diff --git a/README.md b/README.md
index 255f699..fb3b388 100644
--- a/README.md
+++ b/README.md
@@ -63,9 +63,15 @@ Here are the options that can be stored in this file:
// 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,
"edit": null,
+
+ // Sharing links
"sharing": {
"google": null,
"facebook": null,
diff --git a/theme/templates/includes/book/header.html b/theme/templates/includes/book/header.html
index 1195fb2..87c300f 100644
--- a/theme/templates/includes/book/header.html
+++ b/theme/templates/includes/book/header.html
@@ -1,7 +1,7 @@
<div class="book-header">
<!-- Actions Left -->
- {% if githubId %}
- <a href="{{ githubHost }}{{ githubId }}" target="_blank" class="btn pull-left"><i class="fa fa-github-alt"></i></a>
+ {% if options.links.home !== false and (options.links.home != null or githubId) %}
+ <a href="{{ options.links.home|default(githubHost+githubId) }}" target="_blank" class="btn pull-left"><i class="fa fa-bookmark-o"></i></a>
{% endif %}
<a href="#" class="btn pull-left toggle-summary"><i class="fa fa-align-justify"></i></a>
<a href="#" class="btn pull-left toggle-search"><i class="fa fa-search"></i></a>