mirror of
https://github.com/zhigang1992/probot.github.io.git
synced 2026-01-12 17:33:05 +08:00
Add html-proofer and helper scripts
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.jekyll-metadata
|
||||
_site
|
||||
Gemfile.lock
|
||||
vendor
|
||||
|
||||
@@ -11,6 +11,7 @@ exclude:
|
||||
- node_modules
|
||||
- _submodules
|
||||
- script
|
||||
- vendor
|
||||
|
||||
sass:
|
||||
style: :compressed
|
||||
|
||||
12
script/bootstrap
Executable file
12
script/bootstrap
Executable 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
3
script/build
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo "==> Building the site…"
|
||||
bundle exec jekyll build $@
|
||||
@@ -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
6
script/test
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
script/build
|
||||
script/html-proofer
|
||||
Reference in New Issue
Block a user