Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages.
GitHub Pages Gem is a Ruby tool that bootstraps and maintains a local Jekyll build environment matching the exact dependency versions used by GitHub Pages.
GitHub Pages Gem is a Ruby Gem, developed by GitHub, that installs Jekyll and its dependencies at versions pinned to those used by GitHub Pages' build servers. It takes a project's Gemfile as input, adds the gem, and outputs a local environment where jekyll build and jekyll serve behave like the live site build. It runs on any system with Ruby and Bundler version 1.14 or newer.
github-pages versions lists dependency versions in a table or valid Gemfile format; github-pages health-check checks DNS configuration for custom domains.gh-pages image with make image (or make image_alpine for a smaller Alpine-based image) and serve a site on port 4000 without installing Ruby locally.jekyll build or jekyll serve with DISABLE_WHITELIST=true to run non-whitelisted plugins during local preview only.gem 'github-pages', group: :jekyll_plugins to a Gemfile, run bundle install, and Jekyll is available without separate installation.gem update github-pages or bundle update github-pages brings in the latest Jekyll and dependency versions.github-pages health-check to catch DNS misconfigurations before going live.DISABLE_WHITELIST=true during a local build.jekyll serve after installing the gem to see exactly what GitHub Pages will render, with no version drift.bundle exec github-pages versions to see the pinned versions of Jekyll, Kramdown, Liquid, and more, or pass --gemfile to output them in Gemfile format.gh-pages image and serve any Jekyll site from a container without installing Ruby or gems on your host.gem 'github-pages', group: :jekyll_plugins to your project's Gemfile.bundle install; the gem installs Jekyll and all versioned dependencies.jekyll build or preview with jekyll serve, optionally overriding the plugin whitelist with DISABLE_WHITELIST=true for local testing only.The GitHub Pages Gem is free and open source, distributed under the MIT License.
Add gem 'github-pages', group: :jekyll_plugins to your Gemfile, make sure Bundler is newer than version 1.14 by running gem update bundler, then run bundle install. You don't need to install Jekyll separately.
github-pages versions do?It shows the exact versions of Jekyll and its dependencies pinned by the gem, in a table format. Passing the --gemfile flag outputs the same list in a format you can paste directly into a Gemfile. Live production versions are also published at pages.github.com/versions.
Yes, but only locally. Prefix jekyll build or jekyll serve with DISABLE_WHITELIST=true to allow any plugin listed in your site's gems configuration. This option does not affect the build that happens when GitHub Pages publishes your site.
