Skip to content

Commit a635f02

Browse files
committed
Add HTML Proofer to manually check broken HTML tags
1 parent 8856316 commit a635f02

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

Gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
source 'https://rubygems.org'
22
gem 'github-pages', group: :jekyll_plugins
33

4+
# Gems to manually check broken HTML tags
5+
# $ bundle exec rake test
6+
group :development, :test do
7+
gem 'rake'
8+
gem 'html-proofer'
9+
end

Gemfile.lock

+16-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ GEM
1313
execjs
1414
coffee-script-source (1.11.1)
1515
colorator (1.1.0)
16+
colorize (0.8.1)
1617
commonmarker (0.17.9)
1718
ruby-enum (~> 0.5)
1819
concurrent-ruby (1.0.5)
@@ -84,6 +85,15 @@ GEM
8485
html-pipeline (2.8.3)
8586
activesupport (>= 2)
8687
nokogiri (>= 1.4)
88+
html-proofer (3.9.2)
89+
activesupport (>= 4.2, < 6.0)
90+
addressable (~> 2.3)
91+
colorize (~> 0.8)
92+
mercenary (~> 0.3.2)
93+
nokogiri (~> 1.8.1)
94+
parallel (~> 1.3)
95+
typhoeus (~> 1.3)
96+
yell (~> 2.0)
8797
http_parser.rb (0.6.0)
8898
i18n (0.9.5)
8999
concurrent-ruby (~> 1.0)
@@ -209,9 +219,11 @@ GEM
209219
mini_portile2 (~> 2.3.0)
210220
octokit (4.9.0)
211221
sawyer (~> 0.8.0, >= 0.5.3)
222+
parallel (1.12.1)
212223
pathutil (0.16.1)
213224
forwardable-extended (~> 2.6)
214225
public_suffix (2.0.5)
226+
rake (12.3.1)
215227
rb-fsevent (0.10.3)
216228
rb-inotify (0.9.10)
217229
ffi (>= 0.5.0, < 2)
@@ -237,12 +249,15 @@ GEM
237249
tzinfo (1.2.5)
238250
thread_safe (~> 0.1)
239251
unicode-display_width (1.4.0)
252+
yell (2.0.7)
240253

241254
PLATFORMS
242255
ruby
243256

244257
DEPENDENCIES
245258
github-pages
259+
html-proofer
260+
rake
246261

247262
BUNDLED WITH
248-
1.16.1
263+
1.16.3

Rakefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
require "bundler/setup"
2+
task default: 'test'
3+
4+
# cf. How to test a Jekyll site
5+
# http://joenyland.me/blog/how_to_test_a_jekyll_site/
6+
require 'html-proofer'
7+
task test: [:build] do
8+
HTMLProofer.check_directory('./_site', {
9+
allow_hash_href: true,
10+
check_opengraph: true,
11+
check_favicon: true,
12+
check_html: true,
13+
disable_external: true,
14+
#file_ignore: [
15+
# /node_modules/,
16+
# "./_site/ja/workshops/raspi/index.html",
17+
# "./_site/google********.html"
18+
#],
19+
url_ignore: %w(coderdojo.com),
20+
http_status_ignore: [0, 500, 999],
21+
}).run
22+
end
23+
24+
task build: [:clean] do
25+
system 'bundle exec jekyll build'
26+
end
27+
28+
task :clean do
29+
system 'bundle exec jekyll clean'
30+
end

0 commit comments

Comments
 (0)