Next Gen Static Simpler Blogging (Revised)



Thanks to the folks over at HN, I got quite a bit of feedback on my previous post, Next Gen Static Blogging, overwhelmingly - not - positive.

A blog with only 3 entries and more than 66.6% of the articles cover static blogging? Yes, maybe

white-space: pre-line
was too simple, maybe harmful, and the criticism warranted. Let me try to do better with the help of my friend ✨ JavaScript ✨.

Take a look at the source code of this page - what do you think? Let me address your concerns from the previous post:

1. Not simple enough / Not "Next Gen" / What is even that?

Nothing about my approach was next gen, the CSS property was supported by IE8. The simplicity aspect of maintaining a personal site that does not rely on build-scripts, formats, logins, language versions or third parties was, in my mind, unique.

When the software world is continuing its move towards more layers of abstraction and negating the advances in hardware performance, I find comfort in the timelessness, elegance, flexibly and non-breaking nature of HTML. It's easy to open up Notepad, write some HTML and be up and running. It doesn't have to be pretty, it doesn't even have to be a 100% correct but you'll see results right away. AFAIK, there's no other IDE in the world that allows you to create interactivity or transfer knowledge this quickly.

One comment really resonated with me: There's nothing that pushes me to write more. You can buy yourself a fancy writing, journaling or publishing app. But will those actually motivate you? Should everyone actually feel the need to write? I'm unsure and I don't have any good answers for you. Personally, I keep a public list of article ideas, as well as projects or people that inspire me.

To address the lack of features: could RSS, site-wide search, dynamic index generation, etc be added? Yes, but those are not on my priority list.

2. Accessibility / Contrast

Not everyone likes, or can even read, Solarized. Due to the low contrast nature of the theme and me spending a many hours per day using monospace fonts, I've come to prefer this look over pretty much everything else. I use light mode exclusively and though it was a fun exercise to implement dark mode using

@media (prefers-color-scheme: dark)

To address any accessibly concerns, I added Toggle Reader which completely eliminates the monospace, IDE-esque appearance and transforms it to a much more conventional, high-contrast, article look.

3. Breaking Reader Mode

Turns out, relying on

white-space: pre-line
and a code tag breaks things, most notably the Reader Mode. Breaking Reader Mode in conjunction with a font and colours that provide poor accessibility is not a great combination.

Is it worth it to omit the <p> tag and does it even make a difference when writing? I'd argue it's totally worth it. But when it comes to reading, no. Turn's out it's really easy to convert newlines to paragraph tags with JavaScript and since HTML5 doesn't require you to close the tag (thanks susam), I'd argue this is a valid approach.

4. Misuse of <code>

I've changed the root tag from <code> to <article>. There's no cool or hidden reason behind why I had code in the first place, except for how I liked the design.


JavaScript has also allowed me to make everything simpler, maybe my first approach terrible. But on a certain level, it did resonate with a few people and that did make me happy. And it did make me want to do better.

The nice thing when starting out with a very basic concept is how easy it is to iterate and add new features.