Skip to content

Getting Started with Jekyll

Prerequisites

Jekyll is a Ruby gem and requires ruby and gem to be installed.

gem install jekyll bundler

Create and serve a new Jekyll site on your local machine

jekyll new new-site
cd new-site
bundle exec jekyll serve
bundle exec is required when configuration changes need to be aplied.

For changes to content the following is sufficient.

jekyll serve

Managing Draft posts

To serve draft posts in _drafts folder, use:

jekyll serve --draft

drafts are served using current date

Use the default naming convention when a draft post is ready to be published.

By default, Jekyll uses information in categories to create url for posts.

Custom permalinks can be crafted to override the Jekyll defaults. For example to avoid using the categories in the post url

permalink: /:year/:month/:day/:title

Front matter defaults

are defined in the _config.yml file

Jekyll themes

Theme Search

install a theme by adding the theme to the gemfile e.g.

gem "jekyll-theme-hacker"

To install the theme, run

bundle install

Update the config file to use the theme.

To update the site to serve using the new theme, use

bundle exec

Be aware that if the new theme does not have layouts with the same names as the previous theme, pages will not render.

Jekyll variables

List of Jekyll variables

Deploy to github pages