Ver Fonte

Merge pull request #3 from Eido95/patch-2

docs/templates: Fix #2
Jan Holthuis há 5 anos atrás
pai
commit
35705cce18
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      docs/templates.rst

+ 2 - 1
docs/templates.rst

@@ -114,7 +114,7 @@ As of version 0.4.3, the `Read the Docs theme <sphinx_rtd_theme_>`_ does not sup
 So instead of adding a custom template to ``html_sidebars``, you need to create a template file named :file:`versions.html` with the following content:
 
 .. code-block:: html
-
+    {%- if current_version %}
     <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
       <span class="rst-current-version" data-toggle="rst-current-version">
         <span class="fa fa-book"> Other Versions</span>
@@ -140,6 +140,7 @@ So instead of adding a custom template to ``html_sidebars``, you need to create
         {%- endif %}
       </div>
     </div>
+    {%- endif %}
 
 
 .. _sphinx_rtd_theme: https://pypi.org/project/sphinx-rtd-theme/