-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (27 loc) · 741 Bytes
/
Rakefile
File metadata and controls
30 lines (27 loc) · 741 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
require 'rake/testtask'
require 'html-proofer'
Rake::TestTask.new do |t|
t.libs << 'lib'
t.libs << 'test' # here is the test_helper
t.pattern = 'test/**/*_test.rb'
end
task default: :test
task :html_proofer do
`zola build` unless File.directory?('public')
opts = {
ignore_urls: [/\#$/, /localhost/, /rubydoc/, /viewdns/, /paypalme/],
ignore_files: [/slides/],
allow_hash_href: true,
check_favicon: true,
ignore_status_codes: [999, 503, 400, 429, 0],
typhoeus: {
ssl_verifyhost: 0,
ssl_verifypeer: false,
timeout: 30,
connecttimeout: 10,
followlocation: true,
},
swap_urls: { /^https:\/\/phansch.net/ => '' }
}
HTMLProofer.check_directory('public', opts).run
end