-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
34 lines (29 loc) · 922 Bytes
/
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
task default: 'test'
# HTML Proofer helps to detect broken links.
# /~https://github.com/gjtorikian/html-proofer
require 'html-proofer'
task test: [:build] do
options = {
checks: ['Links', 'Images', 'Scripts', 'OpenGraph', 'Favicon'],
allow_hash_href: false,
disable_external: true,
enforce_https: true,
# NOTE: You can ignore file, URL, and response as follows
ignore_files: [
/404\.html/,
/google(.*)\.html/,
],
ignore_urls: [
%r{^http://coderdojo-nago.com}, # Use REGEX to skip testing URLs in a domain like this
]
#ignore_status_ignore: [0, 500, 999],
}
HTMLProofer.check_directory('_site', options).run
end
# Enable 'build' to flush cache files via 'clean'
task build: [:clean] do
system 'bundle exec jekyll build' unless ENV['SKIP_BUILD'] == 'true'
end
task :clean do
system 'bundle exec jekyll clean' unless ENV['SKIP_BUILD'] == 'true'
end