Skip to content

Commit

Permalink
Drop SPECIAL_LINKS from documentation
Browse files Browse the repository at this point in the history
Since https://projects.theforeman.org/issues/32848 the registration link
goes through the normal controller.
  • Loading branch information
ekohl authored and evgeni committed Jul 17, 2024
1 parent c7ba0ef commit 090a0a3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def documentation_url(section = nil, options = {})
if (upstream_url =~ /redhat.com/)
url = upstream_url
else
special_links_pair = ForemanThemeSatellite::Documentation::SPECIAL_LINKS.find { |regex, _val| regex.match(upstream_url) }
url = special_links_pair[1] if special_links_pair
url = "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite" if url.empty?
url = "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite"
end
end
url
Expand Down
4 changes: 0 additions & 4 deletions lib/foreman_theme_satellite/documentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ module Documentation
'foreman_discovery' => "#{ForemanThemeSatellite.documentation_root}/provisioning_hosts/discovering-hosts-on-a-network_provisioning",
}.freeze

SPECIAL_LINKS = [
[/docs\.theforeman\.org\/.*?\/Managing_Hosts\/.*?registering-a-host.*?managing-hosts/i, "#{ForemanThemeSatellite.documentation_root}/managing_hosts/registering_hosts_to_server_managing-hosts#Registering_Hosts_by_Using_Global_Registration_managing-hosts"],
]

DOCS_GUIDES_LINKS = {
'Managing_Hosts' => {
'registering-a-host_managing-hosts' => "#{ForemanThemeSatellite.documentation_root}/managing_hosts/registering_hosts_to_server_managing-hosts#Registering_Hosts_by_Using_Global_Registration_managing-hosts",
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/foreman_theme_satellite_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace :foreman_theme_satellite do

all_links = ForemanThemeSatellite::Documentation::USER_GUIDE_DICTIONARY
.merge(ForemanThemeSatellite::Documentation::PLUGINS_DOCUMENTATION)
.merge(Hash[ForemanThemeSatellite::Documentation::SPECIAL_LINKS])
.merge(ForemanThemeSatellite::Documentation.flat_docs_guides_links)

failed = all_links.filter { |_key, doc_address| doc_address.include?('/html/') && !checker.test_link(doc_address) }
Expand Down

0 comments on commit 090a0a3

Please sign in to comment.