Come full circle - back to HTML

Published on 2020-10-18. Modified on 2023-10-20.

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 later I did some page speed tests and found that the loading time could be improved 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 a static content generator in PHP called Bitdoc which was used in a PHP 7 benchmarking project. Bitdoc originally had plugin support, automatic TOC generation, support for multiple markup languages, and some other bells and whistles, but when the project was finished I removed all that 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, this website is 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 I decided to go back to writing HTML by hand (combined with a little shell scripting if I need to update or change something across multiple files, like the menu).

When you use a text editor like Vim or Neovim (which I do) 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 unnecessary abstraction, in my humble opinion.

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 Neovim and some occasional grep and sed magic if needed. Whenever I update a post or write something new I run a small script that creates the index files and the RSS feed by pulling out the relevant titles and dates from the posts.