Create a Jekyll blog using command line on localhost server
Jekyll is known for building static blogs to be hosted on Github. What makes it special is its minimalist design and fast page load speeds.
Unlike Wordpress, Jekyll does not have any database in the backend, which is one of the main reasons which make the blogs built on jekyll faster.
Also, Jekyll blogs can be hosted on Github free of cost which make it econmical when compared to wordpress.
But setting up a jekyll blog/website for the first time is a bit of difficult task. In this post I will explain you how to set up a jekyll blog on your localhost using command line. Before executing tthe below steps please make sure Ruby is installed in your system.
- Open Command prompt and navigate to your directory where you want to create the jekyll files.
Type the below command and press enter.
gem install bundler jekyll
This will install the jekyll bundler to your machine.
Now to create a new blog, type in the below commands. Replace ‘
' with the name of your blog
jekyll new <blog-name>
Navigate to the blog directory in command promt and type in the below command to start the localhost server.
bundle exec jekyll serve
Now the blog will start running on the localhost. Open any webbrowser and goto http://localhost:4000/ or http://127.0.0.1:4000 to view the jeykll blog you have created through command prompt.