1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
require "bundler/gem_tasks"
require "html-proofer"
#######################################
# default
#######################################
task :default => [:test]
#######################################
# test
#######################################
# A simple test which buils the example site
# and checks all links are valid.
desc "Run HTMLProofer"
task :test do
cd "example" do
sh "bundle exec jekyll clean"
sh "bundle exec jekyll build"
options = { empty_alt_ignore: true, enforce_https: true }
HTMLProofer.check_directory("./_site", options).run
sh "bundle exec jekyll clean"
sh "bundle exec jekyll build -c _config.yml,_config_default_locale_in_subfolder.yml"
HTMLProofer.check_directory("./_site", options).run
end
end
|