Installing Jekyll

Overview

Jekyll is a lightweight blogging platform written in Ruby. Jekyll compiles into a static site with no dynamic endpoints, making it extremely secure and fast. Posts are written using Markdown syntax.

A basic Jekyll blog

A basic Jekyll blog

Quickstart

  1. Login to the terminal
  2. Select a Ruby interpreter to use. If you would like to use the system default version, specif default for the version:
    rvm use default
  3. Install the Jekyll gem and its dependencies using gem:
    gem install --no-rdoc --no-ri passenger rack passenger jekyll rack-jekyll
  4. Create a filesystem layout. You only need to initialize a new Jekyll instance using jekyll new. Jekyll will refuse to initialize a project if the directory already exists, but this behavior may be overrode with --force:
    cd /var/www
    mkdir jekyll/
    cd jekyll
    jekyll new --force .
    • Note 1: pay attention to the presence of “.” after --force. This is not a typo.
    • Note 2: although it may be a Ruby application, Jekyll compiles your site from source, creating a static site. A Passenger-compatible filesystem layout is, therefore, unnecessary.
  5. Compile your Jekyll website Jekyll from its source and place the files under public/. By default, Jekyll places output into _site/. We like consistency, so link _site/ to public/ to serve as the document root.
    jekyll build
    ln -s _site/ public
  6. Attach /var/www/jekyll/public to a subdomain (or addon domain) within the control panel.
  7. Access Jekyll! You’re all set!

Live building

When making changes on-the-fly, you may want Jekyll to automatically recompile your site whenever it detects a change to its source. You can easily do this with jekyll build --watch:

Configuration file: /var/www/jekyll/_config.yml
 Source: /var/www/jekyll
 Destination: _site
 Generating... 
 done.
 Auto-regeneration: enabled for '/var/www/jekyll'
 Regenerating: 3 file(s) changed at 2015-07-08 14:59:50 ...done in 0.375904515 seconds

See also

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.