Browse Source

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.
Tully Foote 4 years ago
parent
commit
f9193e8d12
1 changed files with 3 additions and 3 deletions
  1. 3 3
      docs/templates.rst

+ 3 - 3
docs/templates.rst

@@ -84,11 +84,11 @@ List releases and development versions separately
 Version Banners
 ===============
 
-You can also add version banners to your theme, for example:
+You can also add version banners to your theme, for example create a template file page.html in the templates directory:
 
 .. code-block:: html
 
-    {% extends "page.html" %}
+    {% extends "!page.html" %}
     {% block body %}
     {% if current_version and latest_version and current_version != latest_version %}
     <p>
@@ -100,7 +100,7 @@ You can also add version banners to your theme, for example:
         You're reading the documentation for a development version.
         For the latest released version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name}}</a>.
         {% endif %}
-      <strong>
+      </strong>
     </p>
     {% endif %}
     {{ super() }}