Skip to content

Commit a30497d

Browse files
author
alexey
committed
add if for mkdocs versions support
1 parent 1c44a0d commit a30497d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

theme/readthedocs/breadcrumbs.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<div role="navigation" aria-label="breadcrumbs navigation">
22
<ul class="wy-breadcrumbs">
33
<li><a href="{{ homepage_url }}">Docs v:{{ config.extra.current_version }}</a> &raquo;</li>
4-
{% for doc in current_page.ancestors %}
4+
{% if current_page %}{% for doc in current_page.ancestors %}
55
{% if doc.link %}
66
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
77
{% else %}
88
<li>{{ doc.title }} &raquo;</li>
99
{% endif %}
1010
{% endfor %}
11+
{% endif %}
1112
{% if current_page %}<li>{{ current_page.title }}</li>{% endif %}
1213
<li class="wy-breadcrumbs-aside">
1314
{% if repo_url %}

theme/readthedocs/versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
</div>
28-
<span><a href="{{ previous_page.url }}" style="color: #fcfcfc;">&laquo; Previous</a></span>
28+
{% if previous_page %}<span><a href="{{ previous_page.url }}" style="color: #fcfcfc;">&laquo; Previous</a></span>{% endif %}
2929
<span style="margin-left: 15px"><a href="{{ next_page.url }}" style="color: #fcfcfc">Next &raquo;</a></span>
3030

3131
</div>

0 commit comments

Comments
 (0)