From b7da276ae034d22e34ec92b3d8332f0558b97499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Tue, 24 Mar 2015 23:49:12 +0100 Subject: [PATCH] Fix title for introduction (with i18n) --- lib/utils/navigation.js | 3 ++- theme/templates/website/page.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/navigation.js b/lib/utils/navigation.js index 6912b1422..af9330d8e 100644 --- a/lib/utils/navigation.js +++ b/lib/utils/navigation.js @@ -36,7 +36,7 @@ function navigation(summary, files) { var prev = null, next = null; // Skip if no path - if(!current.path) return null; + if(!current.exists) return null; // Find prev prev = _.chain(navNodes) @@ -59,6 +59,7 @@ function navigation(summary, files) { return [current.path, { index: i, title: current.title, + introduction: current.introduction, prev: prev, next: next, level: current.level, diff --git a/theme/templates/website/page.html b/theme/templates/website/page.html index 37fc9ddbb..d4b5e0b50 100644 --- a/theme/templates/website/page.html +++ b/theme/templates/website/page.html @@ -10,7 +10,7 @@ {% endif %} {% endblock %} -{% block title %}{{ progress.current.title }} | {{ title }}{% endblock %} +{% block title %}{% if progress.current.introduction and not progress.current.title %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ progress.current.title }}{% endif %} | {{ title }}{% endblock %} {% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %} {% block content %}