About     Blog     Github

Setting up a custom domain website with Jekyll

I recently setup this website + blog using Jekyll. Tried to capture the important information in this blog. I added some useful references at the bottom.

This blog assumes that the reader has basic knowledge of Git repos, HTML & Markdown.

  1. Install Jekyll -> gem install jekyll
  2. Following the instructions in jekyll website looked a bit complex to me. So, I would suggest you can skip it for now.
  3. As a starting point, go to Solo. Follow the instructions and play around with the content to get a feel of what Jekyll can do.
  4. Next go to this awesome blog and follow the instructions.

Few things I want to highlight:

  • Creating custom domain is pretty simple. Just follow these steps:
    1. Create a file named CNAME, add the custom domain, you want to map this webpage to (in my case, it was www.theox.in).
    2. Go to your domain service provider (in my case, godaddy) and add a CNAME record for www subdomain to your-username.github.io (in my case, it was dhunnapotha.github.io).

    Please note that Github has pages for profiles and repositories. The instructions given above are for mapping custom domain to repository web pages. The instructions might slightly vary for profile pages. Please check this for more details.

  • If you want to highlight code snippets with language formatting, use the below syntax (ruby, in the below example)

    {% highlight ruby %}
    def foo
      puts 'foo'
    {% endhighlight %}

    Please find more details in the code-snippet-highlighting section.

  • I added Follow Me buttons using addthis.
  • If you are starting with an already built jekyll theme, I would suggest you clone into a new repo instead of working with a forked repo, as commits done to forked repos do not get reflected in your github’s account acitivity.

This blog is built using the approach given above. You can get the source code here.


Fork me on GitHub