-
Notifications
You must be signed in to change notification settings - Fork 14.8k
/
Copy pathhtml-proofer
executable file
·36 lines (33 loc) · 1.11 KB
/
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
33
34
35
36
#!/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/",
"https://foundation.mozilla.org/en/blog/its-a-wrap-movement-building-from-home/",
"https://sloan.org/programs/digital-technology",
%r{^https?://readwrite\.com/2014/10/10/open-source-diversity-how-to-contribute/},
%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,
ignore_urls: url_ignores,
check_html: true,
check_opengraph: true,
favicon: true,
assume_extension: true,
allow_missing_href: true,
enforce_https: false,
only_4xx: true,
ignore_status_codes: [429]
).run