diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-21 20:26:29 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-21 20:26:29 +0100 |
commit | 4f9ece1ec114901d817c77e584b933f195ece923 (patch) | |
tree | 7d4940657bde1ea09f2f5b644ce12a44e795d4d5 | |
parent | 748f0046098ece68547bb86cd72e75e76655a260 (diff) | |
download | gitbook-4f9ece1ec114901d817c77e584b933f195ece923.zip gitbook-4f9ece1ec114901d817c77e584b933f195ece923.tar.gz gitbook-4f9ece1ec114901d817c77e584b933f195ece923.tar.bz2 |
Fix display of summary in website
-rw-r--r-- | lib/generators/site.js | 6 | ||||
-rw-r--r-- | theme/templates/ebook/summary.html | 3 | ||||
-rw-r--r-- | theme/templates/website/includes/summary.html | 5 |
3 files changed, 6 insertions, 8 deletions
diff --git a/lib/generators/site.js b/lib/generators/site.js index 242e153..ffcd005 100644 --- a/lib/generators/site.js +++ b/lib/generators/site.js @@ -179,10 +179,10 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate) title: that.options.title, description: that.options.description, - glossary: that.options.glossary, + glossary: that.book.glossary, - summary: that.options.summary, - allNavigation: that.options.navigation, + summary: that.book.summary, + allNavigation: that.book.navigation, plugins: that.plugins, pluginsConfig: JSON.stringify(that.options.pluginsConfig), diff --git a/theme/templates/ebook/summary.html b/theme/templates/ebook/summary.html index 9a67d28..2e540a6 100644 --- a/theme/templates/ebook/summary.html +++ b/theme/templates/ebook/summary.html @@ -4,10 +4,9 @@ {% macro articles(_articles) %} {% for item in _articles %} - {% set externalLink = item.path|isExternalLink %} <li> {% if item.path %} - {% if !externalLink %} + {% if item.external %} <a href="{{ basePath }}/{{ item.path|contentLink }}">{{ item.title }}</a> {% else %} <a target="_blank" href="{{ item.path }}">{{ item.title }}</a> diff --git a/theme/templates/website/includes/summary.html b/theme/templates/website/includes/summary.html index ffe9f16..39f5295 100644 --- a/theme/templates/website/includes/summary.html +++ b/theme/templates/website/includes/summary.html @@ -1,9 +1,8 @@ {% macro articles(_articles) %} {% for item in _articles %} - {% set externalLink = item.path|isExternalLink %} - <li class="chapter {% if item.path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path and not externalLink %}data-path="{{ item.path|contentLink }}"{% endif %}> + <li class="chapter {% if item.path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path and not item.external %}data-path="{{ item.path|contentLink }}"{% endif %}> {% if item.path %} - {% if not externalLink %} + {% if not item.external %} <a href="{{ basePath }}/{{ item.path|contentLink }}"> <i class="fa fa-check"></i> {% if item.level != "0" %} |