diff --git a/_includes/package_links.html b/_includes/package_links.html index 8b2ac01d..ca70c3be 100644 --- a/_includes/package_links.html +++ b/_includes/package_links.html @@ -13,11 +13,10 @@ {% endif %}
- + {%if hide_link_labels%}
{%endif%} API Docs @@ -51,11 +50,13 @@ Wiki
{%endif%} - + {% endif %} + {% unless package.snapshot.documented %}href="javascript:void(0);"{% endunless %} + title="View RosEco package graph"> {%if hide_link_labels%}
{%endif%} RosEco diff --git a/_plugins/rosindex_generator.rb b/_plugins/rosindex_generator.rb index 115d5abc..94e7f5ff 100644 --- a/_plugins/rosindex_generator.rb +++ b/_plugins/rosindex_generator.rb @@ -7,6 +7,7 @@ require 'colorator' require 'fileutils' require 'find' +require 'net/http' require 'rexml/document' require 'rexml/xpath' require 'pathname' @@ -14,7 +15,6 @@ require 'uri' require 'set' require 'yaml' -require "net/http" require 'thread' # local libs @@ -500,6 +500,15 @@ def extract_package(site, distro, repo, snapshot, checkout_path, path, pkg_type, docs_uri = "http://docs.ros2.org/#{distro}/api/#{package_name}/" end + # ensure documentation uri refers to an existing site + url = URI(docs_uri) + Net::HTTP.start(url.host, url.port) do |http| + response = http.head(url.path) + if response.code != '200' + docs_uri = '' + end + end + # try to acquire information on the CI status of the package ci_data = get_ci_data(distro, package_name, repo.name)