forked from USRSE/usrse.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
44 lines (38 loc) · 1.02 KB
/
Rakefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require 'html-proofer'
# See here for ideas: https://github.com/keegoid/keegoid.github.io/blob/master/Rakefile
def build_site
sh "bundle exec jekyll build"
end
def doctor_site
sh 'bundle exec jekyll doctor'
end
def html_proofer
options = {
:url_ignore => [/us-rse.org/],
:allow_hash_href => true, # don't break on <a href="#">
:assume_extension => false, # (true) for extensionless paths
:http_status_ignore => [
999, # LinkedIn throttling errors
403, # Google scholar errors thrown from Travis (links here will be public anyway)
],
:typhoeus => {
:connecttimeout => 20,
:timeout => 60,
# avoid strange SSL errors: https://github.com/gjtorikian/html-proofer/issues/376
:ssl_verifypeer => false,
:ssl_verifyhost => 0
}
}
HTMLProofer.check_directory("./_site", options).run
end
task :test do
build_site
doctor_site
html_proofer
end
task :test_local do
# Already built so don't build again
doctor_site
html_proofer
end
task :default => :test