Jekyll Notes

1 minute read

When I started moving all of my domains from my co-located hosts into the cloud, I needed a way to keep alive a few websites I own - like this one. Before solving that problem, I already had moved all my repositories to GitHub and one of the requirements therefore was that I wanted to be able to simply push and see my sites online.

GitHub Pages seemed a nice initial solution. It only offers hosting for static pages, but they provide support for Jekyll, a static site generator.

Although far from ideal, it currently allows me to maintain most of my sites, without the need for any fancy CMS.

Installation

Follow the instruction in https://help.github.com/articles/using-jekyll-with-pages

Ruby and RVM

It’s a good idea to use RVM to install a clean Ruby environment.

Minimal Survival commands

$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

$ sudo gem install bundler
Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
Parsing documentation for bundler-1.3.5
Installing ri documentation for bundler-1.3.5
1 gem installed

Create a Gemfile containing

source 'https://rubygems.org'
gem 'github-pages'

Install and run

$ sudo bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing RedCloth (4.2.9) 
Installing fast-stemmer (1.0.2) 
Installing classifier (1.3.3) 
Installing colorator (0.1) 
Installing highline (1.6.20) 
Installing commander (4.1.5) 
Installing ffi (1.9.3) 
Installing liquid (2.5.4) 
Installing rb-fsevent (0.9.3) 
Installing rb-inotify (0.9.2) 
Installing rb-kqueue (0.2.0) 
Installing listen (1.3.1) 
Installing syntax (1.0.0) 
Installing maruku (0.6.1) 
Installing posix-spawn (0.3.6) 
Installing yajl-ruby (1.1.0) 
Installing pygments.rb (0.5.4) 
Installing redcarpet (2.3.0) 
Installing safe_yaml (0.9.7) 
Installing jekyll (1.3.0) 
Installing kramdown (1.2.0) 
Installing rdiscount (2.1.7) 
Installing github-pages (10) 
Using bundler (1.3.5) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

$ sudo bundle exec jekyll serve
Configuration file: /Users/xtof/Workspace/christophe.vg/_config.yml
            Source: /Users/xtof/Workspace/christophe.vg
       Destination: /Users/xtof/Workspace/christophe.vg/_site
      Generating... done.
    Server address: http://0.0.0.0:4000
  Server running... press ctrl-c to stop.

Categories: