Here I gather notes on how I installed Jekyll for Github pages based mostly on informations from Github's help page.

Installing

Ruby and RubyGems as first prerequisite

    ERROR:  Error installing github-pages:
    ERROR: Failed to build gem native extension.

          /usr/bin/ruby1.9.1 extconf.rb
          /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
            from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
            from extconf.rb:1:in `<main>'
  • installation
sudo apt-get install ruby1.9.1
sudo apt-get install ruby1.9.1-dev
  • Under Ubuntu 12.04 on my XPS 13, ruby 1.8 is the default alternative. To force 1.9.1 :
sudo unlink /etc/alternatives/ruby
sudo ln -s /usr/bin/ruby1.9.1 /etc/alternatives/ruby
  • RubyGems
  • Under Ubuntu 12.04 on my XPS 13, there seems to be an already install rubygems 1.8.11, which was not installed via apt-get
sudo apt-get install rubygems

Jekyll

  sudo gem install jekyll

GitHub Pages

  sudo gem install github-pages

Rake

Rake is a build tool that we can use to automate several blog editing task

  sudo gem install rake
  • Rake build file is name Rakefile and is written in pure Ruby

Using Jekyll

Run the command below on the root of your GitHub pages clone

  • starts jekyll to diplay posts AND draft and watch for changes
  • jekyll can then be stoped with CTRL+C
  • by default website is visible on http://localhost:4000
jekyll serve --draft --watch

Published

Category

articles

Tags

Contact