Rawdogging HTML

By Dominik Tarnowski on Jun 2024

Once upon a time, I was using markdown for my blog.

It started simple: md -> html.
I needed to control whitespace better, so I added a plugin.
I wanted syntax highlighting.
I wanted footnotes.
I wanted to write custom HTML inside (for interactive pages).
I wanted to control the layout per page (for some special pages).

I was inspired by pages like Ciechanowski's mechanical watch or AI Horseless Carriages. I wanted to build my own one-off bits of interactivity that would immerse the user - articles that would tell a story more visually and interactively.

I realized, at that point, I didn't want the convenience of markdown. It became a leaky abstraction, I wanted the power of full self-expression through HTML + CSS + JS.

So I ditched it. What you are now reading is written in <html>. This specific article is probably the worst example of why I did this - check out CSS Grid or You worked a day for that meal.

Something I love about this - the source files are Designed to last. They are just HTML, with super simple templating (couple lines of regex). A frustrating thing about markdown is that there are so many different ways of parsing and displaying it. Things like whitespace, additional features (like checklists, GMF, footnotes) vary depending on the implementation. The way I think about my blog, I want it to be independent of any programs.

I learned the hard way that you probably want a light layer of templating on top of HTML. Things like common <head> imports, titles, partials are useful. Even if you are a vim ninja, constructing beauties such as :bufdo :%s/<\head/<link rel=.../<CR> just to add a new shared css file feels a bit hacky. I ended up writing my own in Go - similar to makesite.py. It's a single file. You run site gen ., then rsync the files over to your server.