4 Tips to Supercharge your Jekyll Static Site Hosting

Supercharge your Jekyll site with these 4 tips.

Put your Jekyll into a Git Repository

One of the best part of being in a command-line environment is that you have the full power of the tools available to you by your OS environment.

Why not make sure you never lose track of your blog posts and revisions by using the power and flexibility of Git.

By committing your blog posts and changes as individual commits, you can easily revert back or track changes you make easily at your own convenience.

Gitlab/Bitbucket has free plans available for private repository hosting so you can keep your site private.

Use S3 Static Hosting

Why? Its great! You don’t need launch a server instance, configure it with a reverse proxy of choice, and still worry about keeping the server running. With Amazon’s S3 Static Hosting, you just need to upload your compiled static files onto an Amazon S3 bucket and you’re done. (with just a few additional clicks)

The drawback is that you might need to move your domain nameservers to a DNS provider that allows CNAME flattening if you’re planning to host your site in your root domain (ie. example.com instead of blog.example.com).

This is because for S3 static hosting, you don’t have a fixed IP address that you can point your domain to. Instead you have to rely on CNAMEs to do the linkup and root-level CNAMEs is not widely supported due to the following clause in the RFC:

# Section 3.6.2
If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

Amazon’s Route53 and Cloudflare’s DNS services both are some of the providers that supports some form of CNAME flattening.

Use Cloudflare to save on Data!

If you’re already need to make your nameserver switch, why don’t just move over to Cloudflare and kill two birds with one stone.

Cloudflare’s free plan not only covers your DNS needs but also gives you the power of being able to serve your static content through their Content Delivery Network (CDN).

You not only save your data transfer charges from Amazon but also get the awesome benefit of having your files and assets served from over 74 datacentre locations globally.

Make your deployments easier with S3_Website

Daniel Whyte has a pretty good blogpost on how to get started with this and I find his deployment workflow to be pretty darn good.

Using an opensourced script and of course configuring your AWS credentials, you can quickly deploy your posts directly to S3 without having to jekyll build and manually upload them to S3 via the AWS console.


These are some of the tips I’ve picked up during my recent migration back
which really made things a lot easier.

Previously, I had used a full capistrano script to deploy to a Digitalocean
droplet running nginx which while is powerful in the general scheme of things,
is just too tedious and time-consuming.

We all know how slow Capistrano can get as well.

Hopefully these are some tips that might help you up as you restart your
journey with Jekyll.