This commit is contained in:
Garry Ing 2021-03-07 16:27:28 -05:00
parent 3d8dab70d1
commit 73e5a9bf44
No known key found for this signature in database
GPG Key ID: 3B379B1F2193CC3E
4 changed files with 76 additions and 0 deletions

17
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: HTMLProofer
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake

View File

@ -28,3 +28,5 @@ end
# Performance-booster for watching directories on Windows # Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "html-proofer", "~> 3.18"

View File

@ -8,9 +8,19 @@ GEM
em-websocket (0.5.2) em-websocket (0.5.2)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0) http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7) eventmachine (1.2.7)
ffi (1.14.2) ffi (1.14.2)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
html-proofer (3.18.8)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
parallel (~> 1.3)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0) http_parser.rb (0.6.0)
i18n (1.8.9) i18n (1.8.9)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
@ -50,9 +60,18 @@ GEM
jekyll (>= 3.5, < 5.0) jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9) jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1) jekyll-seo-tag (~> 2.1)
nokogiri (1.11.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.11.1-x86_64-linux)
racc (~> 1.4)
nokogumbo (2.0.4)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.20.1)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
public_suffix (4.0.6) public_suffix (4.0.6)
racc (1.5.2)
rainbow (3.0.0)
rb-fsevent (0.10.4) rb-fsevent (0.10.4)
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
@ -63,12 +82,17 @@ GEM
ffi (~> 1.9) ffi (~> 1.9)
terminal-table (2.0.0) terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (1.7.0) unicode-display_width (1.7.0)
yell (2.2.2)
PLATFORMS PLATFORMS
x86_64-darwin-19
x86_64-linux x86_64-linux
DEPENDENCIES DEPENDENCIES
html-proofer (~> 3.18)
jekyll (~> 4.2.0) jekyll (~> 4.2.0)
jekyll-feed (~> 0.12) jekyll-feed (~> 0.12)
minima (~> 2.5) minima (~> 2.5)

33
Rakefile Normal file
View File

@ -0,0 +1,33 @@
# frozen_string_literal: true
require 'html-proofer'
task default: :check
desc 'Clean out _site'
task :clean do
sh 'rm -rf _site'
end
desc 'Preview site'
task watch: :clean do
sh 'jekyll serve --watch'
end
desc 'Build site'
task build: :clean do
sh 'jekyll build'
end
desc 'Run HTMLProofer on _site'
task check: :build do
options = {
check_html: true,
allow_hash_href: true,
assume_extension: true,
typhoeus: {
headers: { "User-Agent": 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0' }
}
}
HTMLProofer.check_directory('./_site', options).run
end