forked from flutter/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
29 lines (27 loc) · 878 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
require 'html-proofer'
task :build do
sh "bundle exec jekyll build"
end
task :checklinks do
options = {
:log_level => :info,
:empty_alt_ignore => true,
:url_ignore => [
# Skip fragment identifiers, as these are not real links
/#/,
# Skip httpbin links as they are not allowed from TravisCI
'http://httpbin.com',
# Skip links that have been auto-inserted for the 'Edit Source' action (i.e. that match this regexp)
/github.com\/flutter\/website/,
# Skip links to the Chrome tracing tools
'chrome://tracing',
],
:only_4xx => true,
# Replace canonical link with local links.
# Details: http://tongueroo.com/articles/getting-html-proofer-to-work-with-canonical-url-for-google-seo/
:url_swap => {
'https://flutter.io' => ''
}
}
HTMLProofer.check_directory("./_site", options).run
end