Add html-proofer and helper scripts

This commit is contained in:
Brandon Keepers
2017-08-18 14:55:48 -05:00
parent dd8476a266
commit 331d2d43f8
6 changed files with 29 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.jekyll-metadata
_site
Gemfile.lock
vendor

View File

@@ -11,6 +11,7 @@ exclude:
- node_modules
- _submodules
- script
- vendor
sass:
style: :compressed

12
script/bootstrap Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -e
export CC=gcc
echo "==> Installing gem dependencies…"
bundle check --path vendor/gems 2>&1 > /dev/null || {
time bundle install --binstubs bin --path vendor/gems
}
echo "==> Getting submodule for docs…"
git submodule update --init

3
script/build Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "==> Building the site…"
bundle exec jekyll build $@

View File

@@ -3,13 +3,17 @@
require "bundler/setup"
require "html-proofer"
# add links to ignore here
url_ignores = [
# add links to ignore here
# Installation links require being signed in to GitHub
%r{https://github.com/apps/.*/installations/new},
]
HTMLProofer::Runner.new(["_site"],
:type => :directory,
:url_ignore => url_ignores,
:file_ignore => [%r{_site/api/}],
:verbose => !!ENV["VERBOSE"],
:check_html => true
:check_html => true,
:empty_alt_ignore => true
).run

6
script/test Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -e
script/build
script/html-proofer