Add note about using the github-pages gem properly

This commit is contained in:
Parker Moore 2014-09-19 19:56:36 -07:00
parent 3086ea3036
commit 0f008c02d8
1 changed files with 26 additions and 0 deletions

View File

@ -12,6 +12,32 @@ organizations, and repositories, that are freely hosted on GitHub's
powered by Jekyll behind the scenes, so in addition to supporting regular HTML powered by Jekyll behind the scenes, so in addition to supporting regular HTML
content, theyre also a great way to host your Jekyll-powered website for free. content, theyre also a great way to host your Jekyll-powered website for free.
<div class="note protip">
<h5>Use the <code>github-pages</code> gem</h5>
<p>
Our friends at GitHub have provided the
<a href="https://github.com/github/pages-gem">github-pages</a>
gem which is used to manage Jekyll and its dependencies on
GitHub Pages. To use the currently-deployed version of the
gem in your project, add the following to your `Gemfile`:
{% highlight ruby %}
source 'https://rubygems.org'
require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
gem 'github-pages', versions['github-pages']
{% endhighlight %}
This will ensure that when you run <code>bundle install</code>, you
have the correct version of the <code>github-pages</code> gem.
</p>
</div>
## Deploying Jekyll to GitHub Pages ## Deploying Jekyll to GitHub Pages
GitHub Pages work by looking at certain branches of repositories on GitHub. GitHub Pages work by looking at certain branches of repositories on GitHub.