Come full circle - back to HTML

Published on 2020-10-18. Modified on 2020-11-09.

From time to time people email me asking about what kind of work flow I use for this blog. In this article I'll elaborate on the process.

I started writing this blog in 2004 (I eventually deleted some old articles so the first article dates back to 2006) in pure HTML by hand using a simple text editor. It was a bit tedious because I was manually typing out all the different HTML tags. Then came XHTML and I decided to change the HTML to XHTML, but was still writing by hand.

Later I "upgraded" the blog to a custom CMS I had made. The CMS was written in PHP and ran on a PostgreSQL database. This went on for years as the system was working well. Then years later I did some page speed tests and found that the loading time could be improved quite lot by going back to static files, so I began experimenting with different static converters, however I didn't like any of the options I found - they were all unnecessary complex. At that time I was also writing a lot of documentation in DocBook and txt2tags and I was looking for alternatives. I stumbled upon Markdown which quickly grew on me and I eventually replaced DocBook and txt2tags with Markdown in all my writings.

In 2016 I wrote my own static content generator in PHP called Bitdoc which was used in a PHP 7 benchmarking project. Bitdoc originally had plugin support, automatic TOC generation, and a whole lot of other bells and whistles, but when the project was finished I removed all the "clutter" and turned Bitdoc into a simple fast static generator for my daily usage with Markdown as the only supported markup language.

Until recently I have been using Bitdoc for this blog, but the funny thing is that even that seemed like it was just "too much". After all, it's just static HTML! And since I am not actively maintaining Bitdoc I know that at some point something is going to be deprecated in PHP which will break Bitdoc and I then suddenly have to fix problems.

So a little while back I finally decided to go back to writing HTML by hand!

When you use an editor like Vim (or something similar) you hardly think about the HTML as you can use snippets and abbreviations. I still find Markdown more pleasant to write in and I still use it for a lot of documentation and other stuff, but writing a blog like this in Markdown and then converting it into HTML is just too much "fiddling".

With Vim you can easily convert special characters into HTML entities on-the-fly when needed (for coding examples or console output) and with a little regular expressions using something like Sed you can search and replace recursively in multiple files in multiple directories if ever needed.

As it turns out I have now come full circle back to manually typing HTML and I have actually found the return to pure HTML refreshing. No tools and no conversion is needed, just type and upload!

So, for all those who regularly ask, today I manually write HTML by hand using the Neovim editor and some occasional grep and sed magic if needed. I also manually update the front page and the RSS feed with the relevant links. I might eventually script me out of manually updating the front page and the RSS feed, just to make sure I don't forget to add a link to new content, but it will be a simple shell script then - nothing fancy. I run a minor PHP script that uses the PHP DOM to pull out the relevant titles and dates and then create the frontpage and RSS feed whenever the site is updated.