-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (33 loc) · 874 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
35
36
37
abort("Please run this using `bundle exec rake`") unless ENV["BUNDLE_BIN_PATH"]
require "html-proofer"
desc "Build website with jekyll and test with html-proofer"
task :test do
sh "bundle exec jekyll build"
options = {
:allow_hash_href => true,
:check_html => true,
:empty_alt_ignore => true,
:http_status_ignore => [0,400,503,999],
:internal_domains => ["localhost:4000"],
:url_ignore => [
# internal pages
"/about",
"/paintings",
"/photos",
"/poems",
# internal posts
"/i-don't-feel-hungry",
"/little-things",
"/potsdam",
"/three-quarters-of-a-dream",
# regular expressions
/poem\/.*/,
/www\.facebook\.com\/sharer\/.*/,
],
:cache => {
:timeframe => "6w"
}
}
HTMLProofer.check_directory("./_site/", options).run
end
task :default => [:test]