Skip to content

Instantly share code, notes, and snippets.

@MichaelCurrin
Last active April 22, 2022 23:14
Show Gist options
  • Save MichaelCurrin/c4a748ebae3d64e5052ceaee987c8534 to your computer and use it in GitHub Desktop.
Save MichaelCurrin/c4a748ebae3d64e5052ceaee987c8534 to your computer and use it in GitHub Desktop.
Install Jekyll

Install Jekyll

Prerequisites - install Ruby and Bundler globally for your user.

Install Jekyll in a project

Jekyll 3.9

This is the version that runs on GH Pages.

Set up your project gems. Note that the Kramdown parse must be installed explicitly in Jekyll 3.9 (but no 3.8 or 4.x).

  • Gemfile
    source "https://rubygems.org"
    
    gem "jekyll", "~> 3.9"
    gem "kramdown-parser-gfm", "~> 1.1"

Then run:

$ bundle config set --local path vendor/bundle
$ bundle install

See Gemfile in my jekyll-blog-demo project.

Jekyll 4

This is the more modern version of Jekyll. In particular, it is much faster because of caching. See also Migrating 3.x to 4.x in the docs.

Set up your project gems.

  • Gemfile
    source "https://rubygems.org"
    
    gem "jekyll", "~> 4.2"

Then run:

$ bundle config set --local path vendor/bundle
$ bundle install

Global Jekyll install

Not recommended, unless you plan to use the same Jekyll version across all your projects. Or you want to run jekyll new from anywhere.

macOS and Linux

$ gem install jekyll --user-install
$ jekyll --version

Windows

Follow the Jekyll on Windows install guide.

You can download and run the Ruby installer - see Installation via RubyInstaller.

Or use Windows subsystem for Linux - see Installation via Bash on Windows 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment