{"repo":"github/pages-gem","free":true,"listed":false,"github":"https://github.com/github/pages-gem","clone":"git clone https://github.com/github/pages-gem.git","description":"A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages","language":"Ruby","stars":1872,"topics":["jekyll","ruby","ruby-gem","jekyll-plugin","jekyll-theme","github","github-pages"],"license":"MIT","category":"docs-static-sites","readme_excerpt":"GitHub Pages Ruby Gem A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages. Usage One may opt for the conventional approach of using the pages-gem or the containerized approach in which a Docker container is used to provide an environment with most dependencies pre-installed. Conventional Important: Make sure you have Bundler v1.14 by running gem update bundler in your terminal before following the next steps. 1. Add the following to your project's Gemfile: 2. Run bundle install Note: You are not required to install Jekyll separately. Once the github-pages gem is installed, you can build your site using jekyll build , or preview your site using jekyll serve . For more information about installing Jekyll locally, please see the GitHub Help docs on the matter. Docker Provided that Docker is installed, one may avoid the setup of additional tools within the environment by simply spawning a Docker container. 1. Run make image from the root of the pages-gem directory to build an image which will be tagged as gh-pages - Alternatively use make image alpine for a smaller alpine -based image 2. Start an instance of the server by running either: - SITE=PATH TO YOUR PROJECT make server from the root of the gh-pages repository (where the Makefile resides) or - SITE=PATH TO YOUR PROJECT docker run --rm -p 4000:4000 -v realpath ${SITE} :/src/site gh-pages from any directory or - github-pages $PATH TO YOUR PROJECT fro","default_branch":null,"files":null,"tree":[],"storefront":"/r/github","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/github/pages-gem/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}