Jekyll

Requirements

  • Ruby >= 2.7.0
$ ruby -v
  • RubyGems
$ gem -v
  • GCC and Make
$ gcc -v
$ g++ -v
$ make -v

Installation

Install Ruby and other prerequisites

Debian/Ubuntu/Linux Mint

$ sudo apt update
$ sudo apt install ruby-full build-essential

Arch Linux

$ sudo pacman -Syy
$ sudo pacman -S ruby ruby-stdlib

Alpine Linux

$ sudo apk update
$ sudo apk add ruby ruby-dev build-base

Configure the gem installation path

$ echo 'gem: --no-user-install --no-document' > ~/.gemrc
$ echo 'export GEM_HOME="$HOME/.gem"' >> ~/.bashrc
$ echo 'export PATH="$PATH:$GEM_HOME/bin"' >> ~/.bashrc
$ source ~/.bashrc

Install Jekyll and Bundler gems

$ gem install jekyll bundler

Create a new Jekyll site at ./myblog

$ jekyll new myblog

Change into your new directory

$ cd myblog

Build the site and make it available on a local server

$ bundle exec jekyll serve

If you’re using Ruby version 3.0.0 or higher, this step may fail. You may fix it by adding webrick to your dependencies: bundle add webrick.

Now browse to http://localhost:4000

Run this command to update installed gems

$ bundle update