Skip to content

Commit

Permalink
Updates to version switcher
Browse files Browse the repository at this point in the history
If `dev` is listed first within `_config_cockroachdb.yml` > versions,
its version tag will be shown as "Dev", even if it's the same as
"Stable". This commit fixes that.
  • Loading branch information
Nick Vigilante committed May 15, 2023
1 parent 89a396a commit 7827a95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _includes/version-switcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class="version--mobile version--page-dne"
{% endif %}>
{{ v.version.name }}
{% if v.version.tag %}{% unless v.version.tag == "cloud" %}({{ v.version.tag | capitalize }}){% endunless %}{% endif %}
{% unless v.version.tag == "cloud" or v.version.tag == nil %}({% if v.version.version == site.versions["stable"] %}Stable{% elsif v.version.version == site.versions["dev"] %}Dev{% endif %}){% endunless %}
{% unless v.url %}
<span class="version-text--page-dne">
This page does not exist in {{ v.version.version }}
Expand All @@ -33,7 +33,7 @@
data-tooltip data-placement="left" data-container="body" title="This page does not exist in {{ v.version.version }}."
{% endif %}>
{{ v.version.name }}
{% if v.version.tag %}({{ v.version.tag | capitalize }}){% endif %}
{% if v.version.tag %}({% if v.version.version == site.versions["stable"] %}Stable{% elsif v.version.version == site.versions["dev"] %}Dev{% endif %})e{% endif %}
</a>
</li>
{% endfor %}
Expand Down

0 comments on commit 7827a95

Please sign in to comment.