Netlify

· geekery ·

If you’re reading this, I’ve successfully managed to move this site from Linode to Netlify. Basically, I had heard quite a few people talking about Netlify, and got curious about it. It’s a specialist service allowing you to deploy static sites extremely easily by simply pushing a commit to one of the git hosting services (like Github or Bitbucket).

I’ve been very happy with Linode, but the kinds of sites I am hosting there now are very different from the ones I was hosting when I signed up with them. Most of my sites are now static (and with a little effort, I could easily convert the remaining non-static ones), which means that the raw power and flexibility of Linode is overkill for what I need. I also don’t really know what I’m doing with Nginx configuration, so I’ve probably got a sub-optimal setup for static sites. In contrast, Netlify is carefully optimised, and makes a lot of things that I have struggled with (like enabling HTTPS) incredibly easy.

Now that I’ve got it set up, all I need to do is write in my usual way, commit the changes, and then push the commit (in my case to Bitbucket), and the site magically updates. The various optimisations mean that the loading is quite a bit faster now, though there are other things I can probably do to improve it further. To that end, I decided to set up AWS S3 to host the images on this site, rather than the mixed bag of embedding images from Flickr or Droplr. Both are convenient, but can be a bit slow, and it also means that their availability isn’t as solid as it might be. Setting up an S3 bucket turned out to be very easy, and I’m gradually converting the links on the site to point to the version of the image in S3. Transmit 5 makes it really easy to upload and then copy the URL of images you upload.

Another step I’ve taken is to finally remove the blog/ segment from the URLs on this site. This is a hangover from the very first days when I set this site up. I thought at the time that I might want to host other sub-sites here, but it has been 15 years and that still hasn’t happened (and there are much easier ways to host sites at subdomains anyway), so I think it’s time I removed that segment. Netlify lets you create a _redirects file with a simple format for specifying the way that URLs should be rewritten or redirected, and that seems to be working well. Eventually I might go through the old posts and clean up the URLs to the new format, but for now, they should redirect automatically. I’ve also redirected the feed URL, but goodness knows whether that will work or not. I don’t have a good record with getting feed redirects to work! I’m also not confident that Disqus is picking up the redirects as it should, so at the moment comments made before the change don’t seem to be showing. I need to investigate that further, but it did say it might take 24 hours before it updated all the links.

I’m pretty pleased with the way things are working, and when I get more time, I might move my other static sites over, and perhaps eventually cancel my Linode account. I have nothing but good things to say about Linode, but it really is too much for my needs now, so my life would be simpler (and it would cost me less) if I moved everything to Netlify.