Setting up Jekyll
Setting up this blog required me to google around a bit, so I figured I would make a step by step guide on how to get a Jekyll blog created, running locally on mac, and deployed to github pages.
1) Install homebrew (if you dont already have it)
The link to homebrew is here
2) Install Ruby
Once you have homebrew installed
Run brew install ruby
in termial to install ruby
3) Ensure you have the latest version of Ruby
-
Run
ruby -v
in terminal -
If version number is less than 3 link ruby by running:
brew link --overwrite ruby --force
in terminal -
Run
ruby -v
in terminal and confirm verison number is greater than 3
4) Create a new GitHub Repository
- Create a new GitHub repository
git clone <repository name>
to your local machine
5) Install Jekyll
cd <new repository name>
- Run
gem install bundler jekyll
- After the install is done run
jekyll new .
At this point, you should have your directory populated with the default jekyll files.
6) Add webrick
Open the Gemfile
file in your newly populated directory and add the following line: gem "webrick"
I added webrick to the Gemfile so I could run the site locally. This may or may not be necessary depending on your setup.
7) Run the site locally
- Run
bundle update
to build - Start your site with
bundle exec jekyll serve
- Open a browser and navigate to
http://localhost:4000
At this point you should see your site running locally.
8) Push and Deploy
- Push the changes to GitHub
- Deploy to GitHub Pages using this guide
9) Final Remarks
Congrats you have created a Jekyll site!
Some helpful links I found when looking to make edits to my site:
- Jekyll Documentation
- Jekyll GitHub has a very thorough readme
- Andrei Karpathy’s blog repository