public static void

First Steps: Gatsby

Before starting any project logs, it seems to make sense to use this blog as a first example of the style of content I’ll be bringing here.

My first foray into blogging was around 2003 with Movable Type, which was basically a mashup between WordPress and a static site generator at the time. You logged in to a PHP-based web interface, but when content was changed it caused a rebuild of static files on the filesystem that were being served back to the end-user. There were issues with the “freedom” of its licensing (it appears to be completely commercial nowadays) and so I moved to WordPress, never looking back.

WordPress felt highly dynamic compared to Movable Type, in part because it was/is. Of course, there are a raft of concerns and dependencies that come along with this architectural difference. By default, it has public-facing authentication, which represents an attack surface. It is more vulnerable to DoS attacks than a static site because it uses inherently more CPU and memory to serve up a dynamic page than a static one.

For people who wouldn’t be blogging otherwise or who actually make use of the more advanced features that a full-on CMS like WordPress offers, these tradeoffs are likely not even considerations and certainly not concerns. But in the past few years and largely thanks to GitHub, static site generator projects have roared back to life in multiple modern languages. In particular, the utility of hosting a site, be it documentation, demo, or production application, without the need for a traditional web server resonated with developers. For many small sites, there is no reason to pay for a PHP-enabled web host when you can use a free or cheap CDN to host it instead.

I came back to the desire to blog with a basic understanding of this proposition, but I am only scratching the surface of how powerful my current solution is compared to what I was using before. I evaluated Jekyll, Hugo, and Hexo and found them all lacking something - either required a runtime I don’t normally install, had shoddy documentation, or didn’t give enoguh control over the resulting page.

Then I looked at what I had previously ignored - the “application frameworks,” like Next.js and Gatsby. I had ruled them out because I didn’t think I needed to leverage React in something like a blog.

Then I wanted to add comments.

I’ll be following this thread soon, thanks for reading!