Merge pull request #517 from utzig/fix-old-release-urls
Fix nav link normalization for older releases
diff --git a/custom-theme/child_url.html b/custom-theme/child_url.html
index e5ecb62..fbf8e39 100644
--- a/custom-theme/child_url.html
+++ b/custom-theme/child_url.html
@@ -1,5 +1,5 @@
{% if child.url %}
- {{ child.url }}
+ {{ child.url|url }}
{% else %}
{% set child=child.children[0] %}
{% include "child_url.html" %}
diff --git a/custom-theme/choose_doc_version.html b/custom-theme/choose_doc_version.html
index 8f3e19c..47af010 100644
--- a/custom-theme/choose_doc_version.html
+++ b/custom-theme/choose_doc_version.html
@@ -8,7 +8,7 @@
<option value="/v1_4_0/" {% if config.extra.version=="v1_4_0" %}selected="selected" {% endif %}>
Version: 1.4.0
</option>
- <option value="/v1_3_0/" {% if config.extra.version=="v1_3_0" %}selected="selected" {% endif %}>
+ <option value="/v1_3_0/os/introduction" {% if config.extra.version=="v1_3_0" %}selected="selected" {% endif %}>
Version: 1.3.0
</option>
<option value="/v1_2_0/os/introduction" {% if config.extra.version=="v1_2_0" %}selected="selected" {% endif %}>
diff --git a/custom-theme/nested_toc.html b/custom-theme/nested_toc.html
index 9323766..02229e5 100644
--- a/custom-theme/nested_toc.html
+++ b/custom-theme/nested_toc.html
@@ -1,7 +1,7 @@
{% if nav_item.children %}
{% set child=nav_item.children[0] %}
{% if child.title == "toc" %}
- <li {% if child.active %}class="active"{% endif %}><a href="{{ child.url }}">{{ nav_item.title }}</a>
+ <li {% if child.active %}class="active"{% endif %}><a href="{{ child.url|url }}">{{ nav_item.title }}</a>
{% else %}
<li><a href="{% include "child_url.html" %}">{{ nav_item.title }}</a>
{% endif %}
@@ -16,7 +16,7 @@
{% endif %}
</li>
{% else %}
- <li {% if nav_item.active %}class="active"{% endif %}>
- <a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
- </li>
+ <li {% if nav_item.active %}class="active"{% endif %}>
+ <a href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
+ </li>
{% endif %}