From bb5791b9d2c2fb0d828729cd3e5d29ee3c65ea32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 16 Jan 2025 09:24:37 +0100 Subject: [PATCH] Don't show install man page links from other commands --- helpers/config_helper.rb | 2 +- source/partials/_commands_sidebar.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/config_helper.rb b/helpers/config_helper.rb index 2921958b87..9977c461ab 100644 --- a/helpers/config_helper.rb +++ b/helpers/config_helper.rb @@ -8,7 +8,7 @@ def versions end def versions_grouped_by_status - versions.reverse.group_by { status(_1) } + versions.select {|version| documentation_path(current_page_without_version, version) }.reverse.group_by { status(_1) } end private diff --git a/source/partials/_commands_sidebar.haml b/source/partials/_commands_sidebar.haml index 7c7e523585..ef449a8bb4 100644 --- a/source/partials/_commands_sidebar.haml +++ b/source/partials/_commands_sidebar.haml @@ -6,7 +6,7 @@ %optgroup{label: status} - _versions.each do |version| - selected = version == current_visible_version - - value = documentation_path(current_page_without_version, version) || documentation_path('bundle-install.1', version) + - value = documentation_path(current_page_without_version, version) %option{selected: selected, value: value} = version %h4 General