Skip to content
Snippets Groups Projects
Forked from Verified Software / psvg.doc.ic.ac.uk
1372 commits behind the upstream repository.
Rakefile 1009 B
require 'html/proofer'

task :default => :build

desc "Build the site"
task :build do
  sh "bundle exec jekyll build"
end

file_ignore = []
url_ignore = []

desc "Build the site and test output for dead links, invalid html etc."
task :test => :build do
  HTML::Proofer.new("./_site", {
    :disable_external => true,
    :validate_html => true,
    :file_ignore => file_ignore,
    :url_ignore => url_ignore
  }).run
end

desc "Test dead external links"
task :testlinks => :build do
  HTML::Proofer.new("./_site", {
    :validate_html => true,
    :file_ignore => file_ignore,
    :url_ignore => url_ignore,
    :typhoeus => {
      :ssl_verifypeer => false,
      :ssl_verifyhost => 0
    }
  }).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