forked from github/opensource.guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml-proofer
executable file
·32 lines (29 loc) · 891 Bytes
/
html-proofer
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
#!/usr/bin/env ruby
require "bundler/setup"
require "html-proofer"
url_ignores = [
"https://okdistribute.xyz/post/okf-de",
"https://www.drupal.org/community-initiatives/drupal-core/usability",
"https://scripts.sil.org/ofl",
"https://the-orbit.net/almostdiamonds/2014/04/10/so-youve-got-yourself-a-policy-now-what/",
"https://pages.18f.gov/open-source-guide/making-readmes-readable/",
%r{^https?://twitter\.com/},
%r{^https?://(www\.)?kickstarter\.com/},
%r{^https://guides\.github\.com/},
%r{^https://help\.github\.com/},
%r{^https://github\.com/},
%r{^https?://(www\.)?reddit\.com},
]
HTMLProofer::Runner.new(
["_site"],
parallel: { in_threads: 4 },
type: :directory,
url_ignore: url_ignores,
check_html: true,
check_opengraph: true,
check_img_http: true,
favicon: true,
assume_extension: true,
only_4xx: true,
http_status_ignore: [429]
).run