Hosting GitHub Repo on Netlify

After posting about create and hosting personal website using Hugo + GitHub Page, I couldn’t get off the fact that my custom domain does not have HTTPS support. Finally, I decided to figure it out.

The first partial workaround I found was based on CloudFlare. Basically, it replace DNS server by this CloudFlare which can add a certificate to all traffic going through it. However, there is no guarantee for the traffic between GitHub and CloudFlare which makes it less secure. Even more importantly, some browser will mark it as insecure (Chrome does, Firefox and Safari was OK) which repels people from reading my website.

After trying different ways to configure CloudFlare, I finally give up and decide not to let GitHub to host my site. However, I still want the convenience of deploying my site through git. This Netlify came to my attention when I was reading StaticGen for comparing different static site generators. Although, I don’t like the way it work with Hugo by default which add another layer of JavaScript using Victor Hugo, it does offer hosing the raw HTML+CSS static site with HTTPS. More importantly, it connects with GitHub and retrieve repo info automatically for me. I can still use the lijunzh.github.io repo and simply switch the host from github.io to netlify.com. You can check out my configure on Netlify below:

netlify-config

By the way, all these take is a free netlify plan.

Related

comments powered by Disqus