Jekyll


Table of contents


Requirements

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

Jekyll on Ubuntu/Linux Mint

Install a full Ruby development environment

$ sudo apt update
$ sudo apt install ruby-full build-essential zlib1g-dev
$ echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
$ echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.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

Jekyll on Arch Linux

Install a full Ruby development environment

$ sudo pacman -Syy
$ sudo pacman -S ruby
$ echo "PATH=\"\$PATH:\$(ruby -e 'print Gem.user_dir')/bin\"" >> ~/.bashrc
$ echo 'export GEM_HOME=$HOME/.gem' >> ~/.bashrc
$ source ~/.bashrc

Before installing Jekyll make sure to update RubyGems

$ gem update

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