-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (26 loc) · 899 Bytes
/
Rakefile
File metadata and controls
34 lines (26 loc) · 899 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
task default: 'test'
# HTML Proofer helps to detect broken links.
# https://github.com/gjtorikian/html-proofer
require 'html-proofer'
require_relative '_tests/custom_checks'
task test: [:build] do
options = {
checks: ['Links', 'Images', 'Scripts', 'OpenGraph', 'Favicon', 'TrailingSlash'],
allow_hash_href: false,
disable_external: true,
enforce_https: true,
# Use REGEX to ignore files in tests like: /example(.*)\.html/
ignore_files: [],
# Use REGEX to ignore URLs in test like: /example.com/
ignore_urls: [],
#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