Install Jekyll on Mac OS

Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server.

  1. Open up the Terminal. We need to install “Command Line Tools” which gives us access to commonly used tools, utilities, and compilers:
    xcode-select --install
    
  2. Run the command below or open up Xcode which will prompt you to agree to the license:
    sudo xcodebuild -license
    
  3. Install Homebrew:
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    
  4. Install Ruby:
    brew install ruby
    
  5. Install Jekyll:
    sudo gem install jekyll
    
  6. Check the version installed:
    jekyll -v
    
  7. Create a new Jekyll site at ./site
    jekyll new site
    
  8. Change into your new directory:
    cd site
    
  9. Build the site and make it available on a local server:
    bundle exec jekyll serve
    
  10. Now browse to http://localhost:4000

Jekyll themes may require certain Ruby gem dependencies. These dependencies are stored in a Gemfile, which is packaged with the Jekyll theme. You can install these dependencies through Bundler:

gem install bundler