Skip to content

Commit

Permalink
fix: invalid link to dev in drowndown sidebar (#2128)
Browse files Browse the repository at this point in the history
We were not using the label so the link was using the version
number instead of `dev`

Signed-off-by: Charly Molter <[email protected]>
  • Loading branch information
lahabana authored Dec 23, 2024
1 parent e5edcb6 commit c067616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion app/_includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{% if page.doc -%}
<div class="sidebar-top-section">
<form class="version-nav">
<label for="doc-version-selector">Version</label>
{% include version_selector.html name="doc-version-selector" %}
</form>

Expand Down
15 changes: 6 additions & 9 deletions app/_includes/version_selector.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{% assign current_release = page.release %}

<label for="version-selector">Version</label>
<select name="{{ include.name }}" class="version-selector" id="version-selector">
{% for version in site.data.versions %}
{% assign option_value = version.release %}
<option value="{{ option_value }}" {% if version.release == current_release %} selected {% endif %}>
{% if version.label %}
{{ version.label }}
{% else %}
{{ version.release }}
{% if version == site.data.latest_version %}
(latest)
{% endif %}
{% assign option_value = version.label | default: version.release %}
<option id="doc-version-selector" value="{{ option_value }}" {% if version.release == current_release %} selected {% endif %}>
{{ option_value }}
{% if version == site.data.latest_version %}
(latest)
{% endif %}
</option>
{% endfor %}
Expand Down

0 comments on commit c067616

Please sign in to comment.