Jekyll

Creating a new Jekyll Project

Create a new project that includes a Gemfile:

bundle init

Add Jekyll:

bundle add jekyll

Run the setup from Github Pages, override the existing project with the --force flag:

bundle exec jekyll 4.0.0 new . --force

Requirements

Ruby

Install via

brew install ruby@2.7

For the system to find this version of Ruby, you may need to add it to your PATH:

echo 'export PATH="/usr/local/opt/ruby@2.7/bin:$PATH"' >> ~/.zshrc

Note: As of January 2021, GitHub Pages does not support Ruby 3.0, that’s why version 2.7 is installed here.

Experimentally, you can try Ruby 3.0, but it does not come with webrick, so you have to install that yourself:

bundle add webrick

Bundler

Install as a Ruby gem:

gem install bundler

Serve Locally

bundle exec jekyll serve