Posted on 2024/10/22
Last update: 2025/07/15
Writing HTML is hard
The markup of the web is hard to write. Not hard because it’s complex but because it just is too much to write. It’s verbose. That makes it good for the web but it’s also bad because it’s verbose. It feels like one has to care too much when writing.
The solutions to this verbosity is markdown. Other options do exist but I don’t like them so they don’t exist (shrug). The bridge to get from markdown to HTML in other hand is quite insane. I mean if it’s just markdown to HTML then answer is simple, pandoc.
This starts to fall apart when one desires more. CSS & JS? no worries, just
pass it to pandoc and done. That git add . && git commit push to make it
live? Just setup github pages to take your processed html and it should be
fine. A table of content and index of all the writings? no worries. A janky but
easy script to generate the index and then insert it raw into the file.
a script?
This is where I give up as now it’s no longer maintainable or simple (yes. shell scripts or other temporary things are easy but they are not a “simple” solution). Any solution that tries to solve this for you has their own quirks. Since, 2022 I have been using Astro as the solution. Astro is great, it truly feels like an extension of html when setting things up after that its all markdown. But, I am now too tired of it’s quirks.
There might be a lot to hate or love about astro but for me just one issue has made me switch away from it. The GitHub notifications. Every other week I receive a pull request from GitHub’s bot about a new vulnerability in some random dependency of Astro and i should upgrade to fix it.
This is extremely frustrating. I just don’t want to worry about it. One of the primary reasons for choosing Astro was it was easy and whenever if i needed to make rich and dynamic components to integrate with my writings (something akin to Sam Rose’s writings) then with Astro i could do it. But, the notifications has made me reconsider it. I mean, I have written next to nothing in the past two years so, why should i care now. If future me wants to build something like that, future me can worry about it.
For now I have transferred my site from Astro to Zola. So far its fine. No massive dependency, simpler structure and configuration. There is a lot to like about Zola and Zola-like static site generators but, it does feel like a regression in many ways too. For example, The template system is ugly (I dislike all template systems tbh). But, maybe it’s too soon to judge as I was familiar with Astro for a while and I am just not used to Zola’s ways of doing things.
Whatever it is, one thing is certain. Writing HTML is hard.
P.S. I have made my astro site public as a template. feel free to use it. However, I will not be updating it and the public preview will be turned off after a while.
Updates
-
I had posted another post as a update but I am now merging it back here
3G font woes and why i built my own site generator
After reading Tom MacWritght’s blog titled This page weighs 15kb, I decided to run tests on my own site. The results for people on 3g connection was not good. The problem was, I was loading fonts (inter for sans-serif & jetbrains mono for monospace) and those were causing layout shift. So, I have removed them.
I have also decided to not use custom fallback either. But rather use default values of
sans-serif,serif,monospacefor respective types of text because it respects user’s font setting (for example if user has setfontAas their default font they will getfontAwith this approach. Alternatively, If I had used a custom font ordering of something likefontUnknown, ...then if the user’s system hasfontUnknownthen it will be used instead of user’s preferred font). also,- I like when my own setting is respected, so I would like to do so for others too.
- Less of a headache for me as i do not have to think about font ordering.
- I do not see this site as my creative expression rather a medium to share my “creative” expressions.
-
My own site generator
Currently, I am using my own site generator to generate this site. It’s extremely basic and just glue code for few dependencies but it works and is fine for me as I understand what exactly is happening too.
I currently still hand write the writing’s index and few other page’s HTML because they have not been implemented yet and also are a non-issue as I still like writing HTML just not for too long and too much. When it’s too much I move to djot which is a joy to write in. For now, I am happy with where i am. My site generator just turns djot to HTML.
-
Still not happy
I have been writing documents in typst. I now want to write everything in typst. I want to believe I dont have shiny object syndrome and it is nothing but sane of me to want nice things.
Also my first SSG wasn’t really properly done so maybe this time I should give a proper effort to build something I am happy with. for now, I remain unhappy.