Make it a little nicer.

This commit is contained in:
Parker Moore 2014-09-22 22:52:23 -07:00
parent 0f008c02d8
commit a5a8be97de
1 changed files with 13 additions and 11 deletions

View File

@ -19,20 +19,22 @@ content, theyre also a great way to host your Jekyll-powered website for free
Our friends at GitHub have provided the Our friends at GitHub have provided the
<a href="https://github.com/github/pages-gem">github-pages</a> <a href="https://github.com/github/pages-gem">github-pages</a>
gem which is used to manage Jekyll and its dependencies on gem which is used to manage Jekyll and its dependencies on
GitHub Pages. To use the currently-deployed version of the GitHub Pages. Using it in your projects means that when you deploy
gem in your project, add the following to your `Gemfile`: your site to GitHub Pages, you will not be caught by unexpected
differences between various versions of the gems. To use the
{% highlight ruby %} currently-deployed version of the gem in your project, add the
source 'https://rubygems.org' following to your <code>Gemfile</code>:
require 'json' {% highlight ruby %}
require 'open-uri' source 'https://rubygems.org'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
gem 'github-pages', versions['github-pages']
{% endhighlight %}
gem 'github-pages', versions['github-pages']
{% endhighlight %}
This will ensure that when you run <code>bundle install</code>, you This will ensure that when you run <code>bundle install</code>, you
have the correct version of the <code>github-pages</code> gem. have the correct version of the <code>github-pages</code> gem.
</p> </p>