Spinning up 11ty
I've moved my website off of hosted services simply to be able to play around. That’s really all it is: a hobby. I don't need a website for networking, and I don't write a ton of blog posts, so I don't require much in the way of a managed presence. However, hosted services do make things easier, and that’s the route I took for a long time, first with WordPress and then Micro.blog.
A couple of weeks ago, I decided to start from scratch. I built the HTML and CSS from the ground up to ensure everything is valid and accessible. Then, I started adding /pages. This meant I was manually editing multiple headers, footers, and navigation bars. When you only have a few pages, it’s a bit of a hassle, but it’s not the end of the world. It becomes a problem once you reach five or six pages and realize you might add more later.
For example, maybe I want to explain exactly why I’m a fan of the Seattle Sounders without taking up space on my /yep page. I could add a page about how Clint Dempsey once scored a goal with his… well, I’ll save that for the page. Regardless, that's a lot of repetitive editing.
A static site generator (SSG) is built to handle that. Since I already use Font Awesome icons, 11ty was the first SSG I experimented with. It was surprisingly simple to get up and running. I was worried I wouldn't have the patience, but it turned into a fun, daylong project. Truthfully, the main part of the build only took about half a day; the rest was spent figuring out how to make the blog functional. That was a bit more challenging. The reverse chronological listing should have worked using the sample code provided by 11ty, but it didn't, so I had to iron that out.
I spent the biggest chunk of time getting the feed file working correctly. That was a right and proper headache. But it’s working now, and with any luck, my Mastodon community will be seeing a link to this post pretty soon, thanks to Robb Knight's EchoFeed.
There are downsides. With a hosting service like WordPress or Micro.blog, you can post whenever you feel like it. With an SSG, you can write the post in whatever Markdown editor you choose, even on your mobile device. But you have to wait until you get back to your main machine where you can run Terminal commands. There are ways to automate the uploading of files, and I'll explore those later. But for now, I'm happy with how this little holiday project turned out.
Now I need to spend some time working on an important presentation I have to give to my faculty in a couple of weeks. Or maybe I'll stay in holiday mode and assemble the Shuttle Carrier Aircraft LEGO® set my son gave me for Christmas.