brew/docs/Rakefile
Issy Long 17de29e93d
Disable HTMLProofer's assume_extension option
- It reports a lot of broken internal links that do actually exist, it's
  just file extension inference weirdness.
2023-09-01 01:02:02 +01:00

37 lines
783 B
Ruby

require "rake"
task default: :build
desc "Build the site."
task :build do
sh "jekyll", "build"
end
desc "Run Markdownlint to validate the Markdown style."
task :lint do
sh "mdl $(git ls-files '*.md' | grep -v 'Manpage.md')"
end
desc "Run HTMLProofer to validate the HTML output."
task test: :build do
require "html-proofer"
HTMLProofer.check_directory(
"./_site",
parallel: { in_threads: 4 },
favicon: true,
ignore_status_codes: [0, 403],
check_favicon: true,
check_opengraph: true,
check_html: true,
check_img_http: true,
enforce_https: true,
ignore_files: [
%r{Kickstarter-Supporters},
],
ignore_urls: [
"http://formulae.brew.sh",
%r{https://github.com/Homebrew/brew/edit/gh-pages//},
]
).run
end