The First Post
September 18th 2022, 22:05. That's the timestamp of the first commit in the repo for this website. And here it is; the first post on that very website! I can’t believe it’s taken me this long.
I haven’t blogged in years, but after all this time, I feel like I actually have stuff I want to say. So I did the same thing I did early on when I started programming; built myself a blog.
I still remember building a small blog engine with PHP and MySQL when I was in high school, and doing that set me on the career path that has led me to where I am today. That’s kinda wild when you think about it. Back then there was no jQuery, and AJAX as a concept was in its infancy. Heck, we even called the JavaScripting we take for granted today DHTML! Overkill for a blog that didn’t need all of the XMLHttpRequest
and ActiveX
shenanigans required to make things more dynamic. Today that is just a simple fetch
call and you’d do it without even skipping a beat.
The web has come a long way in the past 20 or so years since I started building websites armed with nothing but HTML, CSS and JavaScript. We’ve gone through a phase where the order of those three core technologies became JavaScript, HTML and CSS, but it looks like the pendulum might be swinging back. I’ve been part of that ride, and I’ve written Ember, React, Angular to such an extent that I felt that I could call myself a “Frontend Engineer”. These days I find “web developer” to be a simpler term to use, even if it sounds less cool. It just comes down to what I love, and that is to develop for the web, with the web. Even if I got a bit lost to the hype for a while, I’ve come to realize that everything is HTML in the end, even if you had to jump through 2MB of JS to get to it. So maybe just skip all the JS and just serve HTML straight from the server. And that’s the approach I’ve taken on this blog.
HTML, Enhanced
When I commited that very first bit of code back in 2022, the website was built using Architect, a framework for building serverless applications on AWS. I’ve been using Architect at Fleks for years now, so it felt like a good fit. I started building my own homegrown library for rendering HTML using plain JS functions, because I knew I wanted a website that was light and without that much client side JS.
Then the team behind Architect released Enhance, and suddenly I didn’t even need to build my own library for dealing with all of this.
I’m writing it using HTML first, and sprinkle on some interactivity in places where it makes sense later. And because I’m using Enhance, I’m able to author this website using server-rendered custom elements that will upgrade if I want them to! Enhance has made me fall in love with building for the web again, and it just keeps on getting better!
The approach I’ve taken is pretty simple too! Simple to me at least, I know other people might not agree, or think it’s overkill. But I like it, and that’s what matters to me.
I started out building a blog where I figured the content could be hosted by Sanity. Their platform is cool, their approach to data is cool, PortableText is pretty rad, and they’re Norwegian so that’s always a big bonus! However, I quickly realized that I didn’t need a massive schema for my website and blog posts. So I took a step back and decided to make it simpler; regular pages are just written with plain HTML, and blog posts are stored in DynamoDB with content stored as Markdown. The content is passed through a Markdown parser library, and the output is cached in cloudfront “forever”. I could skip DynamoDB too, but I like the idea of having a database behind the scenes. I might do some webmentions stuff at some point, and storing mentions in a db next to the post itself could lead to some interesting challenges down the line.
The design of the site is based on something I heard from Blake Watson in a ShopTalkShow episode; his website design was based on a color scheme he liked, and I thought that was such a brilliant idea! I’ve always been a fan of Atom’s One themes (Dark specifically), so I’ve taken some heavy inspiration from that. It’s also the theme I use in my editor on a daily basis, so it just made sense to me. Another upside is that the One themes come with light and dark variants, which was absolutely perfect for using the new light-dark()
color functions in CSS 🙌🏻 Using a syntax theme was also a lot of fun, because you can be a bit playful with which colors to use where, and mix it up a bit from page to page - and possibly post to post.
There’s a whole lot I want to do with this website, and I’m really excited to get started!