All Projects → github → Pages Gem

github / Pages Gem

Licence: mit
A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Pages Gem

Beautiful Jekyll
✨ Build a beautiful and simple website in literally minutes. Demo at https://beautifuljekyll.com
Stars: ✭ 3,778 (+126.23%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
So Simple Theme
A simple Jekyll theme for words and pictures.
Stars: ✭ 1,701 (+1.86%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Oscailte
Oscailte — A powerful light, clean, and responsive Jekyll theme.
Stars: ✭ 178 (-89.34%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Hydeout
A refreshed version of Hyde for Jekyll 3.x and 4.x
Stars: ✭ 448 (-73.17%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Alembic
⚗️ A Jekyll boilerplate theme designed to be a starting point for any Jekyll website
Stars: ✭ 501 (-70%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Minimal Mistakes
📐 Jekyll theme for building a personal site, blog, project documentation, or portfolio.
Stars: ✭ 8,967 (+436.95%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Jekyll Theme Basically Basic
Your new Jekyll default theme
Stars: ✭ 524 (-68.62%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Garth
🥁 A really basic theme for Jekyll
Stars: ✭ 85 (-94.91%)
Mutual labels:  jekyll, jekyll-theme, github-pages, ruby-gem
Jekyll Theme Chirpy
A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation.
Stars: ✭ 773 (-53.71%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Chalk
Chalk is a high quality, completely customizable, performant and 100% free Jekyll blog theme.
Stars: ✭ 987 (-40.9%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Jekyll Theme Yat
🎨 Yet another theme for elegant writers with modern flat style and beautiful night/dark mode.
Stars: ✭ 113 (-93.23%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Neumorphism
Neumorphism designed Jekyll theme for personal websites, portfolios and resumes.
Stars: ✭ 96 (-94.25%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Minimal
Minimal is a Jekyll theme for GitHub Pages
Stars: ✭ 753 (-54.91%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Cayman
Cayman is a Jekyll theme for GitHub Pages
Stars: ✭ 719 (-56.95%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Hanuman
A responsive, lightning-fast Jekyll theme built using AMP (Accelerated Mobile Pages) to speed up your blogs and websites.
Stars: ✭ 100 (-94.01%)
Mutual labels:  jekyll, github-pages, jekyll-plugin
Jekyll Timeline
Timeline / Résumé Theme with Jekyll
Stars: ✭ 46 (-97.25%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Forty Jekyll Theme
A Jekyll version of the "Forty" theme by HTML5 UP.
Stars: ✭ 695 (-58.38%)
Mutual labels:  jekyll, jekyll-theme, ruby-gem
Time Machine
Time machine is a Jekyll theme for GitHub Pages
Stars: ✭ 41 (-97.54%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Leap Day
Leap day is a Jekyll theme for GitHub Pages
Stars: ✭ 121 (-92.75%)
Mutual labels:  jekyll, jekyll-theme, github-pages
Merlot
Merlot is a Jekyll theme for GitHub Pages
Stars: ✭ 52 (-96.89%)
Mutual labels:  jekyll, jekyll-theme, github-pages

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.

Gem Version Build Status

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:  
gem 'github-pages', group: :jekyll_plugins
  1. 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
  1. 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 from any directory when func.sh has been sourced into your terminal session or
  • github-pages from the directory of the Jekyll site to be previewed when func.sh has been sourced into your terminal session.

Note: the github-pages function may be enabled by sourcing func.sh. This can be done by appending

source $PATH_TO_THIS_DIRECTORY/contrib/func.sh

to the scripts that load on initiation of a terminal session (usually ~/.bashrc on bash or ~/.zshrc on zsh).:

Running of github-pages inside a directory of a Jekyll site spawns a server on port 4000. One may explicitly provide a path to a Jekyll site and a port by running github-pages $PATH $PORT. This approach is provided as a user-friendlier alternative to the make server or docker run invocations mentioned as the first options in step 2.

The ordering of the arguments for the github-pages function is based on the assumption that it is more likely to need to specify a custom path rather than a custom port.

Command line usage

The GitHub Pages gem also comes with several command-line tools, contained within the github-pages command.

List dependency versions

$ bundle exec github-pages versions
+---------------------------+---------+
| Gem                       | Version |
+---------------------------+---------+
| jekyll                    | x.x.x   |
| kramdown                  | x.x.x   |
| liquid                    | x.x.x   |
| ....                      | ....    |
+---------------------------+---------+

Note, you can also pass the --gemfile flag to get the dependencies listed in a valid Gemfile dependency format. You can also see a list of the live dependency versions at pages.github.com/versions.

Health check

Checks your GitHub Pages site for common DNS configuration issues.

$ github-pages health-check
Checking domain foo.invalid...
Uh oh. Looks like something's fishy: A record points to deprecated IP address

See the GitHub Pages Health Check documentation for more information.

Bypassing the plugin whitelist

If you'd like to run a Jekyll plugin locally that's not whitelisted for use on GitHub Pages, you can do so by prefixing the jekyll build or jekyll serve command with DISABLE_WHITELIST=true. This will allow your site to use any plugin listed in your site's gems configuration flag. Please note, however, this option is only available when previewing your Jekyll site locally.

Updating

To update to the latest version of Jekyll and associated dependencies, simply run gem update github-pages, or if you've installed via Bundler, bundle update github-pages.

Project Goals

The goal of the GitHub Pages gem is to help GitHub Pages users bootstrap and maintain a Jekyll build environment that most closely matches the GitHub Pages build environment. The GitHub Pages gem relies on explicit requirements shared between both users' computers and the build servers to ensure that the result of a user's local build is consistently also the result of the server's build.

Additional tools, such as tools that integrate with the GitHub API to make managing GitHub Pages sites easier are not the primary goal, but may be within the project's scope.

What's versioned

The GitHub Pages gem seeks to version two aspects of the build environment:

1. Ruby

The version of Ruby with which Jekyll is executed. Although Jekyll itself may be compatible with prior or future versions of Ruby, different execution environments yield different results. Ruby 1.8.7 parses YAML differently than 1.9.3, for example, and Kramdown has trouble processing mailto links prior to 1.9.3. In order to ensure that building locally consistently results in the same build as what appears when published, it's essential that Ruby itself is versioned along side the Gem, despite no known incompatibilities.

2. Dependencies

This includes Markdown processors, and any other Jekyll dependency for which version incongruency may produce unexpected results. Traditionally, Maruku, Kramdown, RedCloth, liquid, rdiscount, and redcarpet have been strictly maintained due to known breaking changes.

Changelog

See all releases.

Releasing

To release a new version of this gem, run script/release from the master branch.

License

Distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].