-
Thomas Wood authoredThomas Wood authored
Rakefile 939 B
require 'html-proofer'
task :default => :build
desc "Initialise/update git submodules"
task :init do
sh "git submodule update --init --remote"
end
desc "Build the site"
task :build do
sh "bundle exec jekyll build"
end
htmlproofer_config = {
:disable_external => true,
:check_html => true,
:parallel => { :in_processes => 1 },
:file_ignore => [/README.html/]
}
desc "Build the site and test output for dead links, invalid html etc."
task :test => :build do
HTMLProofer.check_directory("./_site", htmlproofer_config).run
end
desc "Test dead external links"
task :testlinks => :build do
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"
task :serve do
sh "bundle exec jekyll serve"
end
desc "Deploy the website to the webserver"
task :deploy do
sh ".deploy.sh"
end