{# Use our theme's favicon by default. We do it here layout.html since the "html_favicon" configuration option unfortunately can't be set by the theme directly. The "favicon" variable is used by Sphinx versions < 4; "favicon_url" by newer versions. #} {% if not favicon %} {% set favicon = 'favicon.ico' %} {% set favicon_url = pathto('_static/' + favicon, 1) %} {% endif %} {% extends "sphinx_rtd_theme/layout.html" %} {# Most of this block is copied from sphinx_rtd_theme version 0.5.0-1-gaa71fd6. Tweaks were necessary for our theme to provide a default logo, since Sphinx's html_logo configuration option (template variable "logo" below) can't be set by the theme *and also* can't refer to a theme-provided file when set by the doc project's conf.py. We also adjust the rendering of the project name to remove the home icon. #} {% block sidebartitle %} {% set logo = logo if logo else 'nextstrain-logo.svg' if theme_logo else '' %} {% if logo %} {% endif %} {% if theme_subproject %}
{{ project }} {# NOTE the version only works on RTD (not locally) as the variables `nav_version` and `current_version` don't seem to be set on a local build. #} {%- set nav_version = version %} {% if READTHEDOCS and current_version %} {%- set nav_version = current_version %} {% endif %} {% if nav_version %}
{% if nav_version == "stable" %} stable version {% if version and version != "stable" %} ({{ version }}) {% endif %} {% elif nav_version == "latest" %} development version {% if commit %} ({{ commit }}) {% endif %} {% else %} version {{ nav_version }} {% endif %}
{% endif %}
{% endif %} {% include "searchbox.html" %} {% endblock %} {% block extrabody %} {% endblock %}