From 2e741b76d8f64788b2edfd6d2245ee83252ac6f7 Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Wed, 26 Apr 2023 11:18:52 +0100 Subject: [PATCH] BAU: Ignore github links --- Gemfile | 2 +- config.rb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index d36511e4..c9da2f51 100644 --- a/Gemfile +++ b/Gemfile @@ -12,4 +12,4 @@ gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby] gem 'govuk_tech_docs' # Include linter to check for dead internal links -gem 'html-proofer' +gem 'html-proofer', '~> 3.19.4' diff --git a/config.rb b/config.rb index bac1e301..c641f527 100644 --- a/config.rb +++ b/config.rb @@ -17,15 +17,11 @@ /search/ # Provided by tech-docs gem but has a "broken" link from html-proofer's point of view ], :url_ignore => [ - "https://github.com/alphagov/centralised-security-logging-service" + "https://github.com/alphagov/centralised-security-logging-service", + /https:\/\/github.com\// ] }) - proofer.before_request do |request| - # We get rate-limited by GitHub so pause between checking GitHub links - sleep 2 if request.base_url == "https://github.com/" - end - proofer.run rescue RuntimeError => e abort e.to_s