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.
Quickstart
- Login to the terminal
- Select a Ruby interpreter to use. If you would like to use the system default version, specif
default
for the version:rvm use default
- Install the Jekyll gem and its dependencies using gem:
gem install --no-rdoc --no-ri passenger rack passenger jekyll rack-jekyll
- 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.
- Note 1: pay attention to the presence of “
- 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/
topublic/
to serve as the document root.jekyll build ln -s _site/ public
- Attach
/var/www/jekyll/public
to a subdomain (or addon domain) within the control panel. - 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