Listed below are the command line options for htmlproofer:
--allow-missing-href
Don't flag tags missing an href attribute. This is the default for HTML5.
--allow-hash-href
Ignores href="#".
--as-links
Assumes that PATH is a comma-separated array of links to check.
--alt-ignoreimage1,[image2,...]
A comma-separated list of Strings or RegExps containing images whose missing alt attributes are
safe to ignore.
--assume-extension
Automatically add extension (e.g. .html) to file paths, to allow extensionless URLs (as supported
by Jekyll 3 and GitHub Pages).
--checks-to-ignorecheck1,[check2,...]
An array of Strings indicating which checks not to perform.
--check-external-hash
Checks whether external hashes exist (even if the webpage exists). This slows the checker down.
--check-favicon
Enables the favicon checker.
--check-html
Enables HTML validation errors from Nokogiri.
--check-img-http
Check, that images use HTTPS.
--check-opengraph
Enables the Open Graph checker.
--check-sri
Check that <link> and <script> external resources do use SRI.
--directory-index-filefilename
Sets the file to look for when a link refers to a directory. Defaults to index.html.
--disable-external
Don't run the external link checker, which can take a lot of time.
--empty-alt-ignore
If true, ignores images with empty alt attribues.
--error-sortsort
Defines the sort order for error output. Can be :path, :desc, or :status. Defaults to :path.
--enforce-https
Fails if a link is not marked as HTTPS.
--extensionext
The extension of HTML files including the dot. Defaults to .html.
--external_only
Only check for problems with external references.
--file-ignorefile1,[file2,...]
A comma-separated list of Strings or RegExps containing file paths that are safe to ignore.
--help Print this usage information on the command line.
--http-status-ignore123,[xxx,...]
A comma-separated list of numbers representing status codes to ignore.
--internal-domainsdomain1,[domain2,...]
A comma-separated list of Strings containing domains that will be treated as internal urls.
--report-invalid-tags
Ignore errors from --check-html associated with unknown markup.
--report-missing-names
Ignore errors from --check-html associated with missing entities.
--report-script-embeds
Ignore errors from --check-html associated with <script>s.
--log-levellevel
Sets the logging level, as determined by Yell. One of :debug, :info, :warn, :error, or :fatal.
Defaults to :info.
--only-4xx
Only reports errors for links that fall within the 4xx status code range
--storage-dirdirectory
Directory where to store the cache log. Defaults to tmp/.htmlproofer.
--timeframetime
A string representing the caching timeframe.
--typhoeus-configstring
JSON-formatted string of Typhoeus config. It will override the html-proofer defaults.
--url-ignorelink1,[link2,...]
A comma-separated list of Strings or RegExps containing URLs that are safe to ignore. It affects
all HTML attributes. Non-HTTP(S) URIs are always ignored.
--url-swapre:string,[re:string,...]
A comma-separated list containing key-value pairs of RegExp=>String. It transforms URLs that
match RegExp into String via gsub. The escape sequences \: should be used to produce literal :s.'
Specialusagecases
For options which require an array of input, values can be surrounded by quotes. Don't use any spaces.
For example, to exclude an array of HTTP status code:
htmlproofer--http-status-ignore999,401,404./out
For options like --url-ignore, which require an array of regular expressions, the following syntax works:
htmlproofer--url-ignore/www.github.com/,/foo.com/./out
The --url-swap switch is a bit special, since one will pass in a pair of RegEx:String values. The escape
sequences \: should be used to produce literal :. htmlproofer will figure out what you mean.
htmlproofer--url-swapwow:cow,mow:doh--extension.html.erb--url-ignorewww.github.com./out