07 Apr 2019, 20:21

Full Circle to Static Site Generation

Half the fun of having a blog is nerding out over how the blog is built. When I started 18 years ago (that can’t be right) I used MoveableType, which generated static pages for publishing. It worked well enough, but I wanted a Real Website™ with a database and everything so I switched to WordPress some years later. Having better options for comments and more dynamic content was nice enough but really for a personal blog it was unnecessary. Keeping WordPress up to date and blocking spam comments just wasn’t worth the effort. After looking around at some of the static site generators that are frequently used in the JAM Stack, I settled on Hugo. This WordPress plugin for exporting to a Hugo site got the job done for me, with just a minimum amount of additional processing needed.

My first thought was just to start publishing using GitHub pages because it’s a free and well known choice for developers, but then I heard about Netlify from Julia Evans and thought it would be worth a try. The experience with Netlify has been great so far. Really though, the main reason that I wanted to write about this is that I think they are a great example of how there can be a surprising amount of opportunity and untapped potential for improving in product areas that seem to have a number of obvious “good enough” solutions. Static site hosting is certainly something that I would have previously considered to a solved problem. As a developer, it’s already pretty low friction to throw a generated site up on S3 or use the aforementioned GitHub pages. What else can you really do with static sites? A lot, it turns out.

  • A Deploy to Netlify button can create a GitHub repo and deploy a template of a new site that will be live in seconds. Even when there are plenty of other options, something super simple that just works is compelling.
  • Let’s Encrypt certificates that are automatically provisioned so every site can use SSL without any effort.
  • Preview urls generated from branches in your repo to actually see how it will look, not just how it looks when you build locally.
  • Support for running a build command so that you can use the static site generator of your choice. GitHub Pages are great but if you don’t want to use Jekyll then you have to manage generating your site and committing the output to the repo before pushing.
  • After covering the basics quite well, they also have more advanced features to add capabilities that can be nice to have with static sites, like functions where they can set up AWS Lambda functions on your behalf just from JavaScript or Go files in your repo.

It’s good to be reminded that even with technologies that might seem to have no room for new ideas, focusing on providing a high-quality user experience can still yield substantial improvements.