Skip to content

Commit f9193e8

Browse files
authored
Fixup Version Banner usage so it works by default
* Clarify the filename has to match the extended template. * The exclamation point is necessary for it to extend the underlying html template, which is likely what a person following this tutorial is doing. Otherwise it infinitely recurses with the error: `Reason: RecursionError('maximum recursion depth exceeded in comparison')` * Close the strong tag correctly.
1 parent 76dba73 commit f9193e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/templates.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ List releases and development versions separately
8484
Version Banners
8585
===============
8686

87-
You can also add version banners to your theme, for example:
87+
You can also add version banners to your theme, for example create a template file page.html in the templates directory:
8888

8989
.. code-block:: html
9090

91-
{% extends "page.html" %}
91+
{% extends "!page.html" %}
9292
{% block body %}
9393
{% if current_version and latest_version and current_version != latest_version %}
9494
<p>
@@ -100,7 +100,7 @@ You can also add version banners to your theme, for example:
100100
You're reading the documentation for a development version.
101101
For the latest released version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name}}</a>.
102102
{% endif %}
103-
<strong>
103+
</strong>
104104
</p>
105105
{% endif %}
106106
{{ super() }}

0 commit comments

Comments
 (0)