Created
August 30, 2015 22:40
-
-
Save tongueroo/50dafbc9900f7e6d3966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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