I'm Matt Kane. I've made high-speed flashes and beekeeping software, but I mostly spend my time making web and mobile apps with React and TypeScript. Follow me on Twitter and Github.

Continuous deployment of a static site with CodeBuild and CloudFront. Part 1: Deploy Previews

19 October, 2018

Static site generators are awesome (particularly Gatsby ), and they work really well with continuous deployment. Push to your git repo, your CI tests are run, your site builds, then it goes live. What’s not to like? Even better is when you can automatically build previews of all of your pull requests. Netlify does this, and it’s seriously cool. This blog is hosted with Netlify, and I’m a big fan…

Add Disqus comments to a Gatsby blog

07 April, 2018

This blog is a static site built using GatsbyJS . This means you can’t add a comment field like on a normal blog engine such as Wordpress, because there’s no dynamic server to handle it. That’s not a problem though, as we can use a third party comment plugin, such as Disqus. This is how I added Disqus comments to this site. You should be able to see them down below. The nice thing about Gatsby is…

How to install Contenta headless Drupal on a Digital Ocean droplet

07 April, 2018

I’m working on a project that uses Drupal as a data source for a Gatsby site, and I needed a clean Drupal instance for testing. Contenta is a headless Drupal distribution that comes with sensible defaults and some useful demo content, and it seems to fit the bill. It’s even the sample used in the Gatsby “using-drupal” demo, so that’s a good start. Installing it is generally a straightforward…

Don't make me choose my country: Add geolocation to HTML forms in three lines of JavaScript

22 March, 2018

Addresses are some of the most common types of HTML form that you are likely to create, and most have terrible UX design. We are going to progressively enhance our form to fix one of the most common mistakes, and maybe learn some fetch and async/await along the way. This is admittedly quite a lot for three lines of code, so scroll to the bottom if you just want the tl;dr code. Unless you are…