Skip to content

Instantly share code, notes, and snippets.

@tongueroo
Created August 30, 2015 22:40
Show Gist options
  • Save tongueroo/50dafbc9900f7e6d3966 to your computer and use it in GitHub Desktop.
Save tongueroo/50dafbc9900f7e6d3966 to your computer and use it in GitHub Desktop.
require 'html/proofer'
task default: :test
task :test do
sh "bundle exec jekyll build"
HTML::Proofer.new(
"./_site",
# hacks to get html proof to pass links we wanted ignored
check_html: true,
# check_favicon: true,
only_4xx: true,
href_swap: {
%r{http://tongueroo.com(/.*)} => "\\1", # canonical link in head
'#' => '/' # site-nav js # links
},
# http://stackoverflow.com/questions/27231113/999-error-code-on-head-request-to-linkedin
# linkedin denies requests based on User-Agent
href_ignore: [/linkedin\.com/]
).run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment