How to install Jekyll on a Mac?

I like Jekyll but wish I didn’t have to deal with Ruby!

Install rbenv

sudo port install rbenv

Put at the end of a shell startup script (~/.zshenv doesn’t work for me so I put it in ~/.zshrc).

eval "$(rbenv init -)"

Continuing…

rbenv install 2.7.2
rbenv global 2.7.2
gem install --user-install bundler jekyll

For each site

Add a Gemfile with dependencies (see mine).

bundle install

Start Jekyll. (I install Jekyll inside a docs subdirectory so run this from there.)

bundle exec jekyll serve --livereload

If you have problems with Ruby, try:

curl -fsSL https://raw.githubusercontent.com/rbenv/rbenv-installer/main/bin/rbenv-doctor | bash