-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (29 loc) · 699 Bytes
/
Rakefile
File metadata and controls
34 lines (29 loc) · 699 Bytes
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
require 'html-proofer'
task :dev do
sh 'bundle exec jekyll serve'
end
task :build do
build
end
task :default do
proofer_options = {
swap_urls: {
# forces the proofer to find the files locally rather than
# trying to visit the live site for internal links
/^https:\/\/syntheta.se\// => '/'
},
assume_extension: '.html',
only_4xx: true,
enforce_https: false,
ignore_status_codes: [403, 405]
}
build
puts 'Running tests...'
HTMLProofer.check_directory('./_site', proofer_options).run
puts 'Tests complete!'
end
def build
puts 'Building site...'
sh 'JEKYLL_ENV=production bundle exec jekyll build'
puts 'Site successfully built.'
end