Learning Static Site Generation with Jamie Taylor

June 17th, 2019 · 32 mins 33 secs

About this Episode

Guest Bio
Jamie Taylor is a sneaky rogue spending most of his time creating and learning as much about .NET and web technolgies as he can, but has recently started learning to use Hugo, flexbox grid, and doing as much as possible without using the arcane and potentially self-destructive JavaScript. When not working or learning, he can be found giving talks or creating podcasts - he's a serial podcast creator. His podcasts "The .NET Core Show", "The Waffling Taylors", and "Ask a Brit" can be found on all major podcatching services, and you can find him on Twitter @dotnetcoreshow

What was the quest?
So I started out wanting to learn as much about .NET Core as I could, right? This was a previously closed source, Windows only stack primarily targetting enterprise. But now it runs anywhere, like literally anywhere. You can run an app on your desktop, your phone, your watch, your server, your fridge, your TV: all the same code. Crazy, right?

But then I found Netlify, static site generators, and the JAM stack. I haven't been able to do much with the JAM stack yet... well, other than creating the simplest possible sites. But static sites combined with my passion for making incredibly small, efficient, secure web applications is where I wanted to be.

This meant going away and learning a number of different static site generators. I'm from a .NET background, but I wanted to step way out of my comfort zone because I love a challenge. I really like Markdown, so I start with that: I needed a static site generator which could work with Markdown. Turns out that there are a whole bunch of them. StaticGen is a great site which lists them all.

For arbitrary reasons, I picked Gatsby and Hugo. Gatsby because I wanted to level up my JavaScript knowledge, and Hugo because I've wanted to mess around with Go for the longest time.

Within a few evenings of futzing around with both, I had a few static sites being generated. Then I decided to look into hosting, and it turns out that Netlify are great at hosting static sites. You can point it at a repo, and it'll pick up any changes, build the site, and serve it for you... all for free.

A week or so later, and I had a number of static sites up and running. Then it was time to make them faster, smaller, and more secure.

It turns out that you can apply things like HTTP headers with a single config file, and Netlify will take care of configuring everything for you.