1. Home
  2. Ruby
  3. Installing Jekyll

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

Updated on July 8, 2019

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help! If you get an error, visit https://lithiumhosting.com/support instead.
Contact Support