Putting the 'org' in wyrm.org
I spent some time reworking a lot of the stuff on this site.
I'm convinced that I'm the only person other than Michael Kay who doesn't hate XML and XSLT. But I didn't know that when I started this site. All I knew was that I wanted to make a list of the video games that I have in my collection and put them online somewhere that I could check when I was out in the field hunting for specimens to fill out the list.
After a while I started adding features and playing around with things and kind of built a website with it. It's nothing complicated. Not really. But it's fun to play in my sandbox and build out some things that I wanted to make real.
And I still like playing around with XML and XSLT, even though it has very little practical benefit, because it's fun. That's what this website is. Me having fun.
But every year, it gets harder and harder to work on and extend the XML and XSLT that powered this site.
- XML and XSLT support is still stuck at version 1 from 1999 unless I want to license a newer processor
- Browsers will no longer open an XSLT stylesheet from a local filesystem, so you have to put them on a web server (or install one locally).
- Browsers just show a blank page when parsing a document fails instead of showing me where the error happened.
- The WHATWG is actively removing XSLT support from the web browser spec, and it's just a matter of time before browsers stop supporting it completely. Even though there was a lot of pushback on the issues, they're plowing ahead anyway, against the wishes of the people on the ground.
Some of these issues can be mitigated somewhat. I can install a local web server and host my test files there (I did that). I can keep my XSLT simple enough that I can troubleshoot errors by just staring at the code long enough (I did that).
I can set up server-side XSLT processing so your browser doesn't have to do any transformations (I did that, too).
All of these things let me, a non-programmer, add just a tiny bit of programming to this thing so that I can do basic stuff like sorting a table or doing some conditional formatting.
But the writing is on the wall.
I've been doing what I can to champion using XML and XSLT as a viable option for building a basic website, but just in the last couple of years, the amount of roadblocks that I have to work around are just exhausting. Updating this site was already a manual process that I didn't mind too much because it was a fun hobby and I was contributing in some small way, to the browser manufacturer's statistics that these technologies are still viable.
But nobody wants to develop support for them. Even the long-time developer of the libxml and libxslt libraries that everyone uses to get what support does exist into web browsers and everything else is stepping down.
And I realize that doesn't mean that support is going to dry up overnight, but it's annoying. On top of everything else that I have to deal with to just throw some HTML somewhere for someone else to look at them (I'll rant about that another time).
Once the dam broke and Google and Mozilla came out in favor of deprecating XML and XSLT support, and work started toward that end, I started looking for a replacement. The problem is, though, that I wanted something that would give me the ability to create a template that I could fill out, and then create a thing that would transform it into something that a browser could render. I wanted XSLT, but one that was supported.
It turned out that there are a lot of things that kinda did what I wanted, but nothing that really fit the bill. Most of the static site generators that I checked out were either more complicated than I wanted to learn or too simple to be useful.
I eventually decided to give PHP a try. I had dabbled with PHP a little bit in the early 2000's when I was pretending to be a blogger, but never really got too far with it. I opted to just run some early content management systems instead.
I wrestled with this decision for a while, too. PHP is a full-on programming language. Do I really want to learn a programming language just to put some words on a website? Not really.
I started learning PHP anyway, and made some progress. But one day while I was doing my best to avoid learning something I didn't really want to learn in the first place, I remembered Org Mode and how it could be used as a static site generator.
I spent some time with Org Mode and the documentation and was able to get a semblance of the main index page up and in decent shape in a couple of hours (it would have been quicker, but I was also trying to wrap my head around making the CSS work, too). Then I decided to see what it would take to convert the game inventory pages. Then the book inventory. Then the articles, then the howdids, then the blog, and so on until I ran out of things to convert.
I did a lot of greping and regexing and manual interventioning, and converting the roughly 150 XML files into Org files. I also fixed a lot of typos and introduced several all new ones (see how many you can find!). I cleaned up and simplified some of the CSS that I used, and I managed to set up a build process for the whole mess that I'm comfortable enough with for now.
It's not perfect, but it'll do.
Some of the features that I made for the XML and XSLT version of the site didn't quite make the cut, and some of the other features don't work quite like they used to, but it's pretty close, all things considered. And I'm pretty sure that Org Mode isn't going away any time soon, so I have some time to play around and figure things out.
I'm not going to lie, I'm disappointed to know that XML and XSLT is being almost unilaterally killed off in a way that demonstrates rather clearly that users don't really have a say in how the Internet is developed and evolves. But that's another rant for another day.