Cutting the GitHub Pages Gem

Building and testing GitHub Pages sites on your computer just got a whole lot easier with the release of the GitHub Pages Gem. Running Jekyll (the engine that powers GitHub…

| 1 minutes

Building and testing GitHub Pages sites on your computer just got a whole lot easier with the release of the GitHub Pages Gem.

Running Jekyll (the engine that powers GitHub Pages) locally can be a big help when you’d like to preview a site on your computer before pushing changes, or if you are trying to diagnose a troubled build.

Starting today, you can bootstrap an environment that mirrors the GitHub Pages servers as closely as possible by simply running the command gem install github-pages from your project’s directory.

Or if you’ve got Bundler installed, simply add gem 'github-pages' to a file named Gemfile in the project’s root directory, then run the bundle install command.

Better yet, we’re using the Gem here at GitHub, so as our servers update, you can more easily update your local environment, ensuring what you see on your computer matches what others see once the site is published. Just run gem update github-pages or bundle update github-pages and everything will be .

You can begin adding the Gem to your sites immediately, or for more information see the Using Jekyll with Pages help article.

Happy versioning! 💎 💎 💎

Written by

Ben Balter

Ben Balter

@benbalter

Ben Balter is Chief of Staff for Security at GitHub, the world’s largest software development platform. Previously, as a Staff Technical Program manager for Enterprise and Compliance, Ben managed GitHub’s on-premises and SaaS enterprise offerings, and as the Senior Product Manager overseeing the platform’s Trust and Safety efforts, Ben shipped more than 500 features in support of community management, privacy, compliance, content moderation, product security, platform health, and open source workflows to ensure the GitHub community and platform remained safe, secure, and welcoming for all software developers. Before joining GitHub’s Product team, Ben served as GitHub’s Government Evangelist, leading the efforts to encourage more than 2,000 government organizations across 75 countries to adopt open source philosophies for code, data, and policy development.

Related posts