Building Jekyll Theme From Scratch - Part 2

Tagged with : Jekyll

Written on July 16, 2017

In this tutorial, we will see how to install or setup our development environment for Jekyll locally on ( Windows and Linux )

Things We Need

If on Windows :

You Need to Install Bash on Windows Feature, for making development easier. If you are a Windows user, and you are using Windows 10 Aniversary Update, for development you can use the bash for ubuntu in windows feature. For more Info Visit : Bash For Windows 10.

After Installing Ubuntu, The rest of the tutorial is same for both windows and linux.

Open your Bash terminal and install all the requirements. You might face some errors while installing ruby using sudo apt-get install ruby. So you can use ruby-switch.

$ sudo -s
$ apt update
$ apt install make gcc

$ apt-add-repository ppa:brightbox/ruby-ng
$ apt update
$ apt install ruby2.3 ruby2.3-dev ruby-switch

$ ruby -v
$ ruby-switch --set ruby2.3

So once ruby is installed, and everything looks fine. We can now install jekyll now.

$ gem install jekyll
$jekyll -v
$ cd /mnt/c/Users/<your username>/Desktop
$ jekyll new myblog && cd myblog

You might need to configure the _config.yml file and set the site settings to http://localhost:4000, to make jekyll work locally.

Once Done. Now you can serve the Jekyll Blog.

$ jekyll serve -w

“-w” act as watch for jekyll changes. So whenenever you change something in Jekyll project. Jekyll automatically regenerates the project for live changes.

Fire Your Browser and visit the following URL :

Jekyll builds the project , it converts all the markdown in to static html file.

You can use this command to build jekyll manually , and you can also change the destination and look for changes to rebuild :

 $ jekyll build --destination <destination> 
 $ jekyll --watch