Shubham
Ramdeo


November 11, 2018

A Static site setup with Jekyll, Github, and Netlify

I think I have redesigned this website for the third time. I keep changing the frameworks and services for speed and experience, change is for good!

A Static site setup with Jekyll, Github, and Netlify

First came the Github

The first version was based on pure Jekyll and was hosted on Github, using Cloudflare as CDN. Although both provided good performance, there was a huge issue I had when using free SSL certificates provided by Cloudflare. Github is not yet configured well to work with HTTPS on custom domains. We already aware of the fact that Github pages do not provide any way to configure and control the headers and redirections and therefore on using external services make it even worse.

The problem I had was like this: If a user goes to such a link:

http://ramdeoshubham.com/beginning-java

When hosted on Github, it will get redirections as:

  1. http://ramdeoshubham.com/beginning-java [Request]
  2. https://ramdeoshubham.com/beginning-java [301]
  3. http://ramdeoshubham.com/beginning-java/ [301] [WHAT!]
  4. https://ramdeoshubham.com/beginning-java/ [Final]

Look at the redirection 2 to 3. This is no point for that. First, the redirection takes the service from HTTPS to non-HTTPS, and second, having so many dangerous redirects has its own SEO issues too.

Github pages build Jekyll safe with –safe option, which does not allow the use of any external Jekyll plugins. Which takes away half of the Jekyll’s awesomeness!

The heavy head Wordpress

I quickly moved the content of the site to my shared hosting servers and set up a Wordpress site with a customized twenty-seventeen theme. I added W3 Total Cache plugin, Cloudflare CDN, and need to use a lot of security and control plugins.

Being a geek, I was not at all satisfied with an Automated Website. My reasons were simple. I need full control over each and every code of my webpage source. It should be as light as possible. I should be able to customize it without following any rules of the platform. Maybe I actually loved Jekyll more. But the problem with SSL I was having kept me confused for a couple of months.

Netlify to rescue!

I had created my account on Netlify more than a year ago. But don’t know why I kept ignoring it. It was probably a random ad I saw and got hit to try it.

My Netlify Dashboard
My Netlify Dashboard

Netlify is simple! I just added my Github repository itself, configured the custom domain and it got to build. That’s it.

Yes! With Netlify you get a lot of extra features like:

  1. Free SSL certificates
  2. Custom Domain and Subdomains
  3. optional Netlify DNS
  4. Resource Optimisation
  5. Can use external Jekyll Plugins

A lot more, and this all much for FREE!

I was really surprised when I tried and tested to see all that was really free!

I switched to Netlify DNS, removed the site from my server and quickly redesigned the site.

My pages went from 3 MB to 350 KB. Loading time from 5 seconds to 500 ms! Having a site in control feels like a superpower to a geek!

Static site the better way!

Well, there is no best way to host your static site because there are many services with great opportunities and features competing edge to edge. But for me at least, I find this route the best!

As from today onwards, we are now officially hosting all new site. There is a lot of content to be published. So stay Connected!


You might also like:

(prev)
(next)

(rand) Different types of websites
(rand) How to increase torrent downloading speed ?
(rand) Open Source in a minute

© Shubham Ramdeo, 2020
you are really awesome!

Site Designed with Beauter🌸