Install Jekyll on macOS and deploy your static website to GitHub Pages
desiredpersona.comDon't do this unless you are a Jekyll developer. You don't need to install Jekyll on your Mac to test your website locally. Use Docker instead. There is a learning curve, but you can use your Docker skills for much more than just testing a static website.
Briefly, you need to (1) download and install Docker Community Edition for Mac, (2) create a DockerHub account and download a Docker image that's configured to run the GitHub Pages software, and (3) learn how to create a container and communicate with it. This is all documented online. Contact me if you need help.
Craig I have to disagree with you.
The official Jekyll docs recommend the best way to install Jekyll is via RubyGems. I have covered everything here for someone getting started with a Jekyll blog, all the necessary Git commands and steps to deploy to Github Pages. No need to manage containers, servers or databases.
Saying "Don't do this" is a little harsh as knowledge of Docker is really not necessary. Using Docker is more of a personal choice thats suits your workflow.
My advice is the result of wasting many hours installing, re-installing, and trying to update and tweak Ruby and Python software on my Mac, just to test various static websites. I learned nothing useful by doing this, and I'm trying to discourage others from making the same mistake.
In the past i too faced similar issues starting out (about 2 years ago) with Jekyll especially on Windows so i can relate.
I don't think this is the case anymore tho, as you can use two commands `brew update` to update Ruby and `bundle update` to manage Jekyll.
- Homebrew does a great job of managing Ruby versions on macOS.
- Bundler now manages all of Jekyll's dependencies without issue.
You're right. I should have left off the first sentence of my original comment. It was too harsh. And I agree, the tools are getting better.
Here's a challenge for you. Write a companion article about testing a GitHub Pages blog on a Mac without installing Jekyll. Instead, run the Jekyll server in a Docker container. I don't think anyone else has written a good article on this topic, and I think it would complement your original post nicely. Good luck!
Thanks. I have added this to my writing list.