From 622906d8b3f0c1c1b8fbb423747a133ca8e67aeb Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Tue, 15 Aug 2017 23:17:57 -0500 Subject: [PATCH 01/10] Add html-proofer --- Gemfile | 4 ++++ script/html-proofer | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 script/html-proofer diff --git a/Gemfile b/Gemfile index 4892c29..f50cdf4 100644 --- a/Gemfile +++ b/Gemfile @@ -16,4 +16,8 @@ group :scripts do gem 'octokit' end +group :test do + gem 'html-proofer' +end + gem 'rb-fsevent', '0.9.8' # See issue https://github.com/guard/listen/issues/431 diff --git a/script/html-proofer b/script/html-proofer new file mode 100755 index 0000000..576d7c9 --- /dev/null +++ b/script/html-proofer @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "html-proofer" + +url_ignores = [ + # add links to ignore here +] + +HTMLProofer::Runner.new(["_site"], + :type => :directory, + :url_ignore => url_ignores, + :verbose => !!ENV["VERBOSE"], + :check_html => true +).run From dd8476a266ab749cec66a6abc9dc66a5cee484b3 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 14:51:40 -0500 Subject: [PATCH 02/10] Update docs submodule --- _submodules/probot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_submodules/probot b/_submodules/probot index 8fd40f7..f53fe41 160000 --- a/_submodules/probot +++ b/_submodules/probot @@ -1 +1 @@ -Subproject commit 8fd40f72c8bd5531d2ad8720ee9ea7c3d07bdf44 +Subproject commit f53fe41db559da5dcd3b2a1cd30df0bb60059b7d From 331d2d43f81125ad2961345e6d5bd0ad999ea690 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 14:55:48 -0500 Subject: [PATCH 03/10] Add html-proofer and helper scripts --- .gitignore | 1 + _config.yml | 1 + script/bootstrap | 12 ++++++++++++ script/build | 3 +++ script/html-proofer | 8 ++++++-- script/test | 6 ++++++ 6 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 script/bootstrap create mode 100755 script/build create mode 100755 script/test diff --git a/.gitignore b/.gitignore index c0baf81..1ccc2ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .jekyll-metadata _site Gemfile.lock +vendor diff --git a/_config.yml b/_config.yml index 36065b5..87e289d 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,7 @@ exclude: - node_modules - _submodules - script + - vendor sass: style: :compressed diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 0000000..33a4d47 --- /dev/null +++ b/script/bootstrap @@ -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 diff --git a/script/build b/script/build new file mode 100755 index 0000000..2bb2977 --- /dev/null +++ b/script/build @@ -0,0 +1,3 @@ +#!/bin/sh +echo "==> Building the site…" +bundle exec jekyll build $@ diff --git a/script/html-proofer b/script/html-proofer index 576d7c9..9b960cf 100755 --- a/script/html-proofer +++ b/script/html-proofer @@ -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 diff --git a/script/test b/script/test new file mode 100755 index 0000000..6a65159 --- /dev/null +++ b/script/test @@ -0,0 +1,6 @@ +#!/bin/sh + +set -e + +script/build +script/html-proofer From 3e79f5294dcccc9aa3e39cb742d8f5eeeee1f064 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 14:56:26 -0500 Subject: [PATCH 04/10] Add travis config --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5fb13d0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +before_script: "./script/bootstrap" +script: "./script/cibuild" + +#environment +language: ruby +rvm: + - 2.4.0 + +notifications: + email: false + +env: + global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true + +sudo: false +cache: bundler From c264b180135e603e12af43a654cc047092c480cb Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 15:01:41 -0500 Subject: [PATCH 05/10] Fix some proofer errors --- _apps/settings.md | 2 +- _includes/nav.html | 2 +- _layouts/app.html | 4 ++-- _layouts/docs.html | 2 +- index.html | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/_apps/settings.md b/_apps/settings.md index 434a616..3484ab1 100644 --- a/_apps/settings.md +++ b/_apps/settings.md @@ -13,7 +13,7 @@ This GitHub App syncs repository settings defined in `.github/settings.yml` to G ## Usage -1. **[Install the app](https://github.com/integrations/configurer/installations/new)**. +1. **[Install the app](https://github.com/apps/settings/installations/new)**. 2. Create a `.github/settings.yml` file in your repository. Changes to this file on the default branch will be synced to GitHub. All settings are optional. diff --git a/_includes/nav.html b/_includes/nav.html index 16ea6e5..acf4ec4 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -6,7 +6,7 @@

{% unless homepage %} - + Probot {% endunless %} diff --git a/_layouts/app.html b/_layouts/app.html index 4d43952..da74d47 100644 --- a/_layouts/app.html +++ b/_layouts/app.html @@ -10,7 +10,7 @@ layout: default
{{ page.description }}
- + {% octicon plus class:"mr-2" %} Add to GitHub @@ -31,7 +31,7 @@ layout: default {% for screenshot in page.screenshots %}
- + Screenshot of {{ page.title }} app
{% endfor %}
diff --git a/_layouts/docs.html b/_layouts/docs.html index 4c4f7e0..25cbae0 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -34,7 +34,7 @@ layout: default

Find a mistake or want to help improve this documentation? - Suggest changes on GitHub + Suggest changes on GitHub

diff --git a/index.html b/index.html index f8a10e5..5c8eacf 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ layout: default

- + Probot logo
@@ -41,7 +41,7 @@ layout: default
{% octicon star heigh:16 class:"v-align-middle" %} {{ app.stars }}
- + Made by {{ app.author }}
@@ -75,7 +75,7 @@ layout: default
- +

Optimized for GitHub

@@ -109,7 +109,7 @@ module.exports = robot => {
- +
@probot commented From 4f83c2cdb7025a571c0f935a199cd2768a1fdaf7 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 15:06:07 -0500 Subject: [PATCH 06/10] Fix travis config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5fb13d0..7d10523 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ before_script: "./script/bootstrap" -script: "./script/cibuild" +script: "./script/test" #environment language: ruby From d3554372b3514d87724301d27c91c1f3d8046ac4 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 15:13:38 -0500 Subject: [PATCH 07/10] Fix jekyll warning --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 87e289d..aaaff4e 100644 --- a/_config.yml +++ b/_config.yml @@ -36,7 +36,7 @@ defaults: values: layout: docs -gems: +plugins: - jekyll-octicons - jekyll-sitemap - jekyll-seo-tag From 8652ad8fb5bb0292a057f9494d3266cc6a53db42 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 15:13:50 -0500 Subject: [PATCH 08/10] Fix whitespace --- _includes/nav.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/nav.html b/_includes/nav.html index acf4ec4..16ea6e5 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -6,7 +6,7 @@

{% unless homepage %} - + Probot {% endunless %} From bb2151ea599772e9589a7e00b014e498677e50c0 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 15:21:55 -0500 Subject: [PATCH 09/10] Rescue the htmlproofer error and print message --- script/html-proofer | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/script/html-proofer b/script/html-proofer index 9b960cf..2c57a8b 100755 --- a/script/html-proofer +++ b/script/html-proofer @@ -9,11 +9,16 @@ url_ignores = [ %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, - :empty_alt_ignore => true -).run +begin + HTMLProofer::Runner.new(["_site"], + :type => :directory, + :url_ignore => url_ignores, + :file_ignore => [%r{_site/api/}], + :verbose => !!ENV["VERBOSE"], + :check_html => true, + :empty_alt_ignore => true + ).run +rescue => e + puts "\n", e + exit 1 +end From 741641202567592310eb787cb16463e646a69105 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Fri, 18 Aug 2017 15:27:59 -0500 Subject: [PATCH 10/10] Ignore mochajs.org for now --- script/html-proofer | 1 + 1 file changed, 1 insertion(+) diff --git a/script/html-proofer b/script/html-proofer index 2c57a8b..a1c4b4c 100755 --- a/script/html-proofer +++ b/script/html-proofer @@ -7,6 +7,7 @@ require "html-proofer" url_ignores = [ # Installation links require being signed in to GitHub %r{https://github.com/apps/.*/installations/new}, + "https://mochajs.org/", ] begin