Skip to content

Commit b0c30db

Browse files
author
jabenninghoff
committed
Dynamically load GitHub Pages dependencies
Thanks to https://byparker.com/blog/2014/stay-up-to-date-with-the-latest-github-pa ges-gem/.
1 parent 0c87c08 commit b0c30db

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Gemfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
source 'https://rubygems.org'
2-
ruby '2.3.1'
3-
gem 'github-pages', '104', group: :jekyll_plugins
2+
3+
require 'json'
4+
require 'open-uri'
5+
version = JSON.parse(open('https://pages.github.com/versions.json').read)
6+
7+
ruby version['ruby']
8+
gem 'github-pages', version['github-pages'], group: :jekyll_plugins
49
gem 'html-proofer', group: :htmlproofer

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ PLATFORMS
153153
DEPENDENCIES
154154
github-pages (= 104)
155155
html-proofer
156+
json
156157

157158
RUBY VERSION
158159
ruby 2.3.1p112

0 commit comments

Comments
 (0)