forked from kubevirt/kubevirt.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
41 lines (37 loc) · 1.32 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
desc 'Generate HTML of Kubevirt.io'
task :build do
puts "Building"
sh "bundle exec jekyll build"
end
namespace :links do
require 'html-proofer'
desc 'Checks html files looking for external dead links'
task :test_external => :build do
options = {
:assume_extension => true,
:only_4xx => true,
:log_level => :info,
:internal_domains => ["https://instructor.labs.sysdeseng.com"],
:external_only => true,
:url_swap => {
'https://www.kubevirt.io/' => '',
}
}
puts "Checking External links..."
HTMLProofer.check_directory("./_site", options).run
end
desc 'Checks html files looking for internal dead links'
task :test_internal => :build do
options = {
:assume_extension => true,
:only_4xx => true,
:allow_hash_href => true,
:log_level => :info,
:disable_external => true
}
puts "Checking Internal links..."
HTMLProofer.check_directory("./_site", options).run
end
end
desc 'The default task will execute all tests in a row'
task :default => ['links:test_external', 'links:test_internal']