Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tkknight committed Feb 8, 2022
1 parent 823764e commit d7f9114
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
38 changes: 30 additions & 8 deletions docs/src/_templates/custom_sidebar_logo_version.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@

{% if on_rtd %}
{% if rtd_version == 'latest' %}
<div id="slim-version-box">
<b>{{version}} (latest)</b>
</div>
<span title="latest development version">
<img src="https://img.shields.io/badge/latest_version-{{ version }}-orange?style=flat">
</span>
{% elif rtd_version == 'stable' %}
<b>{{version}} (stable)</b>
<span title="stable version">
<img src="https://img.shields.io/badge/stable_version-{{ version }}-green?style=flat">
</span>
{% else %}
<b>{{version}}</b>
{%- endif %}
<span title="old version (not stable or latest)">
<img src="https://img.shields.io/badge/old_version-{{ version }}-red?style=?style=flat">
</span>
{% endif %}
{%- else %}
<b>{{version}}</b>
{# not on rtd #}
<span title="development version">
<img src="https://img.shields.io/badge/dev_version-{{ version }}-blue?style=?style=flat">
</span>
{%- endif %}


<span title="latest development version">
<img src="https://img.shields.io/badge/latest_version-{{ version }}-orange?style=flat">
</span>
<span title="stable version">
<img src="https://img.shields.io/badge/stable_version-{{ version }}-green?style=flat">
</span>
<span title="old version (not stable or latest)">
<img src="https://img.shields.io/badge/old_version-{{ version }}-red?style=?style=flat">
</span>
<span title="development version">
<img src="https://img.shields.io/badge/dev_version-{{ version }}-blue?style=?style=flat">
</span>


6 changes: 3 additions & 3 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def autolog(message):
# This is the rtd reference to the version, such as: latest, stable, v3.0.1 etc
rtd_version = os.environ.get("READTHEDOCS_VERSION")

# For local testing purposes we can force bneing on RTD and the version
# on_rtd = True # useful for testing
# rtd_version = "latest" # useful for testing
# For local testing purposes we can force being on RTD and the version
on_rtd = True # useful for testing
# rtd_version = "stable" # useful for testing

if on_rtd:
autolog("Build running on READTHEDOCS server")
Expand Down

0 comments on commit d7f9114

Please sign in to comment.