Creating a website using git, markdown and Jekyll in 3 hours.

I want to create content as static pages, but writing pure HTML would be too tedious. Jekyll caught my eye once, as the project was mentioned in Hacker News.

I searched for similar projects (and found several), but nevertheless decided to try Jekyll out.


I was able to install Jekyll and create a base blog skeleton in 3 hours.


These dependencies are purely due my personal preferences.

Ruby Version Manager (RVM)


I want to use similar workflow as I have with Python (pyenv) and Node.js (nvm).

This means the ability to install multiple ruby versions and gems depending on the project I’m working on without polluting the global system.


I followed the steps as in explained in

$ gpg --keyserver hkp:// --recv-keys \
  409B6B1796C275462A1703113804BB82D39DC0E3 \
$ curl -sSL | bash -s stable

Installation automatically updated the ~/.bashrc and ~/.profile files.

I checked the results and everything looked OK, except I wondered why the $HOME/.rvm/scripts/rvm was sourced only in ~/.profile but PATH was updated in both files.

I closed the current terminal and opened a new one; the changes to PATH environment variable came to effect and I could run rvm in the command line.

Ruby v2.4.1


Well, Jekyll is written in Ruby.

My knowledge and experience on using Ruby is limited; therefore I’m not really familiar with the different Ruby versions and implementations.

So I checked what was available:

$ rvm list known
# MRI Rubies
[ruby-]1.8.7[-head] # security released on head

# for forks use: rvm install ruby-head-<name> --url --branch 2.2

# JRuby

# Rubinius

# Opal

# Minimalistic ruby implementation - ISO 30170:2012

# Ruby Enterprise Edition

# Topaz

# MagLev

# Mac OS X Snow Leopard Or Newer

# IronRuby

Those results led me to do some googling and I learned that Ruby MRI seems to be the ‘reference implementation’, so let’s roll with that.

Then I checked to learn more about the different MRI versions. Well, nothing indicated why I shouldn’t install the latest available version in RVM, so I chose 2.4.1.


$ rvm install 2.4.1
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/9/x86_64/ruby-2.4.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Installing requirements for debian.
Updating system
askolsam password required for 'apt-get --quiet --yes update':

At this stage I entered my password and let RVM do it’s thing. Few minutes later the process finished successfully.

I tried to test the installed Ruby:

$ rvm use ruby-2.4.1

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit for an example.

Ok, this is clearly a symptom of the file $HOME/.rvm/scripts/rvm not being sourced, just like I wondered in the RVM installation phase.

For testing purposes I just manually sourced the file:

$ source $HOME/.rvm/scripts/rvm

and tried again:

$ rvm use ruby-2.4.1
Using /home/askolsam/.rvm/gems/ruby-2.4.1

$ which ruby

Installation succesful.

Update 2018-06-24

I should/could have read the URL mentioned in the error message above.

Create a RVM project files to my git repo

I just followed the RVM best practices guide.

$ cd ~src/webpages
$ rvm use ruby-2.4.1
$ rvm gemset create jekyll
ruby-2.4.1 - #gemset created /home/askolsam/.rvm/gems/ruby-2.4.1@jekyll
ruby-2.4.1 - #generating jekyll wrappers........
$ rvm --ruby-version use 2.4.1@jekyll

Test that settings are applied:

$ cd ~
$ rvm use system
Now using system ruby.

$ which ruby

$ rvm gemset list

gemsets for system (found in /home/askolsam/.rvm/gems/system)
=> (default)

$ cd ~src/webpages
$ which ruby

$ rvm gemset list

gemsets for ruby-2.4.1 (found in /home/askolsam/.rvm/gems/ruby-2.4.1)
=> jekyll

Looks ok.

Installing Jekyll

As instructed in Jekyll quick-start guide, I ran:

$ cd ~src/webpages
$ gem install jekyll
Fetching: public_suffix-3.0.2.gem (100%)
Successfully installed public_suffix-3.0.2
Fetching: addressable-2.5.2.gem (100%)
Successfully installed addressable-2.5.2
Fetching: colorator-1.1.0.gem (100%)
Successfully installed colorator-1.1.0
Fetching: http_parser.rb-0.6.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed http_parser.rb-0.6.0
Fetching: eventmachine-1.2.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed eventmachine-1.2.5
Fetching: em-websocket-0.5.1.gem (100%)
Successfully installed em-websocket-0.5.1
Fetching: concurrent-ruby-1.0.5.gem (100%)
Successfully installed concurrent-ruby-1.0.5
Fetching: i18n-0.9.5.gem (100%)
Successfully installed i18n-0.9.5
Fetching: rb-fsevent-0.10.3.gem (100%)
Successfully installed rb-fsevent-0.10.3
Fetching: ffi-1.9.23.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.23
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.6.gem (100%)
Successfully installed sass-3.5.6
Fetching: jekyll-sass-converter-1.5.2.gem (100%)
Successfully installed jekyll-sass-converter-1.5.2
Fetching: ruby_dep-1.5.0.gem (100%)
Successfully installed ruby_dep-1.5.0
Fetching: listen-3.1.5.gem (100%)
Successfully installed listen-3.1.5
Fetching: jekyll-watch-2.0.0.gem (100%)
Successfully installed jekyll-watch-2.0.0
Fetching: kramdown-1.16.2.gem (100%)
Successfully installed kramdown-1.16.2
Fetching: liquid-4.0.0.gem (100%)
Successfully installed liquid-4.0.0
Fetching: mercenary-0.3.6.gem (100%)
Successfully installed mercenary-0.3.6
Fetching: forwardable-extended-2.6.0.gem (100%)
Successfully installed forwardable-extended-2.6.0
Fetching: pathutil-0.16.1.gem (100%)
Successfully installed pathutil-0.16.1
Fetching: rouge-3.1.1.gem (100%)
Successfully installed rouge-3.1.1
Fetching: safe_yaml-1.0.4.gem (100%)
Successfully installed safe_yaml-1.0.4
Fetching: jekyll-3.7.3.gem (100%)
Successfully installed jekyll-3.7.3
Parsing documentation for public_suffix-3.0.2
Installing ri documentation for public_suffix-3.0.2
Parsing documentation for addressable-2.5.2
Installing ri documentation for addressable-2.5.2
Parsing documentation for colorator-1.1.0
Installing ri documentation for colorator-1.1.0
Parsing documentation for http_parser.rb-0.6.0
Installing ri documentation for http_parser.rb-0.6.0
Parsing documentation for eventmachine-1.2.5
Installing ri documentation for eventmachine-1.2.5
Parsing documentation for em-websocket-0.5.1
Installing ri documentation for em-websocket-0.5.1
Parsing documentation for concurrent-ruby-1.0.5
Installing ri documentation for concurrent-ruby-1.0.5
Parsing documentation for i18n-0.9.5
Installing ri documentation for i18n-0.9.5
Parsing documentation for rb-fsevent-0.10.3
Installing ri documentation for rb-fsevent-0.10.3
Parsing documentation for ffi-1.9.23
Installing ri documentation for ffi-1.9.23
Parsing documentation for rb-inotify-0.9.10
Installing ri documentation for rb-inotify-0.9.10
Parsing documentation for sass-listen-4.0.0
Installing ri documentation for sass-listen-4.0.0
Parsing documentation for sass-3.5.6
Installing ri documentation for sass-3.5.6
Parsing documentation for jekyll-sass-converter-1.5.2
Installing ri documentation for jekyll-sass-converter-1.5.2
Parsing documentation for ruby_dep-1.5.0
Installing ri documentation for ruby_dep-1.5.0
Parsing documentation for listen-3.1.5
Installing ri documentation for listen-3.1.5
Parsing documentation for jekyll-watch-2.0.0
Installing ri documentation for jekyll-watch-2.0.0
Parsing documentation for kramdown-1.16.2
Installing ri documentation for kramdown-1.16.2
Parsing documentation for liquid-4.0.0
Installing ri documentation for liquid-4.0.0
Parsing documentation for mercenary-0.3.6
Installing ri documentation for mercenary-0.3.6
Parsing documentation for forwardable-extended-2.6.0
Installing ri documentation for forwardable-extended-2.6.0
Parsing documentation for pathutil-0.16.1
Installing ri documentation for pathutil-0.16.1
Parsing documentation for rouge-3.1.1
Installing ri documentation for rouge-3.1.1
Parsing documentation for safe_yaml-1.0.4
Installing ri documentation for safe_yaml-1.0.4
Parsing documentation for jekyll-3.7.3
Installing ri documentation for jekyll-3.7.3
Done installing documentation for public_suffix, addressable, colorator, http_parser.rb,
eventmachine, em-websocket, concurrent-ruby, i18n, rb-fsevent, ffi, rb-inotify, sass-listen,
sass, jekyll-sass-converter, ruby_dep, listen, jekyll-watch, kramdown, liquid, mercenary,
forwardable-extended, pathutil, rouge, safe_yaml, jekyll after 33 seconds
25 gems installed

$ gem install bundler
Fetching: bundler-1.16.1.gem (100%)
Successfully installed bundler-1.16.1
Parsing documentation for bundler-1.16.1
Installing ri documentation for bundler-1.16.1
Done installing documentation for bundler after 4 seconds
1 gem installed

“Everything went better than expected”.

Creating the blog skeleton

As instructed in Jekyll quick-start guide, I ran:

$ cd ~src/webpages
$ jekyll new blog
Running bundle install in /home/askolsam/src/webpages/blog...
  Bundler: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
  Bundler: Fetching gem metadata from
  Bundler: Fetching gem metadata from
  Bundler: Resolving dependencies...
  Bundler: Using public_suffix 3.0.2
  Bundler: Using addressable 2.5.2
  Bundler: Using bundler 1.16.1
  Bundler: Using colorator 1.1.0
  Bundler: Using concurrent-ruby 1.0.5
  Bundler: Using eventmachine 1.2.5
  Bundler: Using http_parser.rb 0.6.0
  Bundler: Using em-websocket 0.5.1
  Bundler: Using ffi 1.9.23
  Bundler: Using forwardable-extended 2.6.0
  Bundler: Using i18n 0.9.5
  Bundler: Using rb-fsevent 0.10.3
  Bundler: Using rb-inotify 0.9.10
  Bundler: Using sass-listen 4.0.0
  Bundler: Using sass 3.5.6
  Bundler: Using jekyll-sass-converter 1.5.2
  Bundler: Using ruby_dep 1.5.0
  Bundler: Using listen 3.1.5
  Bundler: Using jekyll-watch 2.0.0
  Bundler: Using kramdown 1.16.2
  Bundler: Using liquid 4.0.0
  Bundler: Using mercenary 0.3.6
  Bundler: Using pathutil 0.16.1
  Bundler: Using rouge 3.1.1
  Bundler: Using safe_yaml 1.0.4
  Bundler: Using jekyll 3.7.3
  Bundler: Fetching jekyll-feed 0.9.3
  Bundler: Installing jekyll-feed 0.9.3
  Bundler: Fetching jekyll-seo-tag 2.4.0
  Bundler: Installing jekyll-seo-tag 2.4.0
  Bundler: Fetching minima 2.4.0
  Bundler: Installing minima 2.4.0
  Bundler: Bundle complete! 4 Gemfile dependencies, 29 gems now installed.
  Bundler: Use `bundle info [gemname]` to see where a bundled gem is installed.
New jekyll site installed in /home/askolsam/src/webpages/blog.

Previewing the blog

As instructed in Jekyll quick-start guide, I ran:

$ cd ~/src/webpages/blog
$ bundler exec jekyll serve
configuration file: /home/askolsam/src/webpages/blog/_config.yml
            Source: /home/askolsam/src/webpages/blog
       Destination: /home/askolsam/src/webpages/blog/_site
 Incremental build: disabled. Enable with --incremental
                    done in 0.368 seconds.
 Auto-regeneration: enabled for /home/askolsam/src/webpages/blog'
    Server address:
  Server running... press ctrl-c to stop.

I opened with my browser and very minimalistic example content was visible.

Mission accomplished.