Skip to content

Commit

Permalink
Show precise versions for stable and development ("latest")
Browse files Browse the repository at this point in the history
Make it even clearer what software revisions those labels represent.

A `git describe` style string¹ for development ("latest") would be even
better than just the git revision, but that appears to be non-trivial to
implement.

Resolves <nextstrain/augur#817>.

h/t to @corneliusroemer for the suggestion and @huddlej for bringing it
up again in <#15>.

¹ e.g. "${tag}-${n}-g${sha}" where ${tag} is the last/closest tag to the
  current commit, ${n} is the number of commits since that ${tag}, and
  ${sha} is the shortened id of the current commit.
  • Loading branch information
tsibley committed Jan 28, 2022
1 parent 0571baf commit ffac8ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/nextstrain/sphinx/theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@
{% if nav_version %}
<div class="version">
{% if nav_version == "stable" %}
{# don't show anything #}
stable version
{% if version and version != "stable" %}
<small>({{ version }})</small>
{% endif %}
{% elif nav_version == "latest" %}
development version
{% if commit %}
<small>(<tt>{{ commit }}</tt>)</small>
{% endif %}
{% else %}
version {{ nav_version }}
{% endif %}
Expand Down

0 comments on commit ffac8ee

Please sign in to comment.