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 } } 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 site using rsync" task :deploy => :build do sh "umask 0002 && rsync --chmod=Dg+s,ug+rwX,o+rX --chown=:rr -igrp --delete _site/ /vol/rr/www" end