@movq@www.uninformativ.de It’s the “Lyse types the entire HTML by hand” generator. Yes, no kidding. I write articles so rarely, that I can do that once in a while. It’s fun to some degree, but also not.

After some time, I finally recorded some Vim macros to insert <b>…</b>, <var>…</var>, <span class=s>…</span> etc. around the tokens. This helped a little bit. But I was still questioning my mental state doing it like that. I also had to fix a bunch of the end tags by hand, because the word movement wasn’t enough or the end movement went too far. Quite the annoying process for sure.

But I think the HTML looks a wee bit nicer and is maybe even semantically a little bit better than having only <span>s everywhere. I find the <span class="whatever"> just soo awfully long. Of course, I never look at the code again, but knowing, that e.g. there is a <b> and it saves so many bytes in comparison, makes me happy. It is a more elegant solution in my opinion. Not by much, but better nonetheless. It’s a matter of simplicity. Admittedly, even I can’t avoid the <span>s alltogether. Oh well. On the other hand, I’m sure that this does not make any difference whatsoever. I bet, nobody and nothing, like a screenreader, analyzes the HTML for that, where this would be truly useful.

Oh! Maybe text browsers, though. It just occurred to me while composing this reply. :-) Haha, I lost my bet quickly. w3m picks up at least the <b> for keywords and builtin types, <u> for filenames and <i> for comments. Yey. No different styles for <var> and <mark>, unfortunately. elinks only renders the bold. It’s cool that I had the right intuition right from the beginning, despite being unable to pinpoint it. :-)

All the <span> hell with common syntax highlighters is a downer for me that keeps me from looking more into them. If I wrote more articles, I might rig something up with Pygments. At least that’s somehow positively connotated in my brain. Not sure if it actually deserves it, but I dealt with that in some loose form (can’t even remember) years and years ago. Apparently, it wasn’t too terrible.

To prepare the table of contents, I used grep and sed with some manual intervention in the end. The entire process can be improved. Absolutely.

You wrote your own site generator, didn’t you?

⤋ Read More

Participate

Login or Register to join in on this yarn.