Skip to content
Snippets Groups Projects
Commit df25c015 authored by Thomas Wood's avatar Thomas Wood
Browse files

Fix execution of HTMLProofer test tool, pin its major version

parent 3ecefa08
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,11 @@ gem 'rake'
gem 'jekyll'
group :default, :jekyll_plugins do
gem 'jekyll-scholar'
gem 'jekyll-scholar', '~> 5'
end
group :test do
gem 'html-proofer'
gem 'html-proofer', '~> 3'
end
group :development do
......
......@@ -93,9 +93,9 @@ PLATFORMS
ruby
DEPENDENCIES
html-proofer
html-proofer (~> 3)
jekyll
jekyll-scholar
jekyll-scholar (~> 5)
pry
rake
......
require 'html/proofer'
require 'html-proofer'
task :default => :build
......@@ -7,30 +7,23 @@ task :build do
sh "bundle exec jekyll build"
end
file_ignore = []
url_ignore = []
htmlproofer_config = {
:disable_external => true,
:check_favicon => true,
:check_html => true,
:parallel => { :in_processes => 4 }
}
desc "Build the site and test output for dead links, invalid html etc."
task :test => :build do
HTML::Proofer.new("./_site", {
:disable_external => true,
:validate_html => true,
:file_ignore => file_ignore,
:url_ignore => url_ignore
}).run
HTMLProofer.check_directory("./_site", htmlproofer_config).run
end
desc "Test dead external links"
task :testlinks => :build do
HTML::Proofer.new("./_site", {
:validate_html => true,
:file_ignore => file_ignore,
:url_ignore => url_ignore,
:typhoeus => {
:ssl_verifypeer => false,
:ssl_verifyhost => 0
}
}).run
HTMLProofer.check_directory("./_site", htmlproofer_config.merge({
:disable_external => false
})).run
end
desc "Build the site, rebuild when files are edited, and serve via a local http server"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment