Static Sites with Jekyll
Static sites are fast to load and are particularly suited to blog style pages written with markdown. They also don’t require a database, so provide many benefits compared with Wordpress or Drupal. I considered Hugo, but decided to try Jekyll because of the effectively free hosting and native integration on GitHub. Also, there are more Themes readily available.
A note of caution…,sites using Jekyll are written locally on your computer and then pushed to the host. Therefore, Jekyll and all it’s pre-requisite software, for example Ruby, needs to be installed using the command line (terminal), which is not so user friendly and can result is some teething problems..
Some Problems Installing Jekyll Locally on a Mac
However, I received the following error
This error has been described on the Jekyll forums gem-install-jekyll-failed-on-Mac-OS-X.
The steps taken to resolve these were as follows:
Install HomeBrew using
Install a user specific version of Ruby using
Create a user specific bash profile as described at How To Edit Your PATH Environment Variables On Mac OS X using
Inside the .bash_profile add the line so it can find the updated path to the ruby as described How to add /usr/local/bin in $PATH on Mac
To ensure that all the Jekyll dependencies were installed I installed Bundler using
and then within the directory having the Jekyll/ Github repository I ran
Finally, as I was using Bundler to manager my dependencies, in order to run Jekyll locally, I needed to use
Now my site was successfully being served locally at http://127.0.0.1:4000/ using the built in web server provided by Jekyll.
It is worth noting that there is a great resource at GitHub Using Jekyll with Pages, which may be a simpler way to install Jekyll. I may try that next time…