Create a blog in 5 Minutes and host in GitHub for FREE | Jekyll tutorial

Anuradha Niroshan
3 min readFeb 4, 2019
blogging

Spare five minutes for reading this and you won’t regret. You can find a plethora of blogging platforms on the internet. One which is most popular these days is medium. You can create a medium account and write blog posts right out of the box. Wordpress can also be used for this purpose.

But it may not 100% what you want. Here are some issues that you might have encountered when using these platforms.

  • Less flexibility.
  • Difficult to customize enough to get the look and feel you want.
  • Difficulty in monetizing your content.
  • Database Configuration.
  • Hosting fees.

What is Jekyll?

Jekyll is a tool which you can use to transform your plain text into static websites and blogs. You can write blogs using markdown syntax and jekyll will build a site that is ready for deployment. If you are wondering how awesome Jekyll is, Here are some real world examples that use Jekyll.

Why Jekyll?

  • Its very simple to use
  • No need for configuring databases.
  • Write using markdown syntax
  • Free hosting in Github-pages
  • Free hosting in cloud cannon
  • Blog aware (Permalinks, categories, pages, posts, and custom layouts)

How to get started with Jekyll?

Jekyll can be used by both developers and non-developers. People with coding knowledge can jump straight to coding after setting up a Ruby development environment. For others, they can use cloud cannon to create client editable jekyll sites. For those who don’t want to go from scratch can use pre built Jekyll themes here.

Getting our hands dirty

Now I’ll show you how to clone an existing Jekyll theme and host it in Github-pages. We are going to use emarald free theme for this demo.

Steps to follow.

  1. Fork the above repository to your GitHub account. (If you don’t have a GitHub account, create a one here)
  2. On GitHub, navigate to your GitHub Pages site’s repository.
  3. Under your repository name, click Settings

(Note: You can create a private repository and publish your site, but when you fork a repo you can’t make it private)

4. Use the Select source drop-down menu to select gh-pages as your GitHub Pages publishing source. (usually, development is done under gh-pages branch)

5. Click Save.

save image

In case if you face any issue, the complete source code for this project is available here.

Conclusion

This is just an introduction on Jekyll and how to set it up in github-pages. I hope to cover the following in upcoming tutorials.

  • Setting up a custom domain
  • creating local development environment with Jekyll Ruby Gem
  • Adding Disqus comments and MailChimp integration
  • liquid syntax in Jekyll
  • creating posts, categories
  • Integrating AdSense account

And of course, if you liked what you read, please share this with your friends. Feel free to leave any comments as well.

--

--

Anuradha Niroshan

Computer Science and Engineering, University of Moratuwa. Lives in Srilanka. “Blogging is a conversation, not a code.”