Live data from Hacker News

No longer writing my own damn HTML

claytonwramsey.com

11–20 of 98 posts

Re: No longer writing my own damn HTML

#11

The big problem was not wanting to write even a small amount of is. After all, a simple web component in a page of code would have allowed client side includes.

I did think about that! However, I didn't like the idea of making the client side do work to make up for my own poorly-managed website. Forcing users to run code just to render some boring text seems like a waste.

Hmm - what is the actual cost incurred by the users here? Mostly battery right? Is that not virtually inconsequential to each individual?

I mean you could sum it all up and compare it to human-hours or something but that's not a useful metric because it's distributed.

Personally I think it's better to distribute the workload across clients. We'll probably see purely client driven UI's dominate the future. Imagine users being able to display data (because fundamentally that is all a blog [or any site] is) in a way chosen by each user. That would probably be worth the extra cycles on device.

Re: No longer writing my own damn HTML

#12

I have always written my own static blog generator, moving from PERL to Ruby and most recently Python. I find the other blog systems are too complicated for what I want. Plus, I think I like writing the generator more than writing actual posts.

+1.

It's nice to have to a set of programs I moderately care about, so when I'm learning another language I can port them to it.

They're unimportant enough that I can comfortably experiment, but important enough that I want to complete the rewrite.

My "blog engine" is a nushell script that uses pandoc and built-in XML support to convert markdown into a site+feed.

Re: No longer writing my own damn HTML

#13

I run my personal site off of Hugo. You can load some decent themes and adding new content is a relatively painless process. But I do feel like there is a cost to using static site generators. Raw HTML is easier to work with if you aren't dealing with a lot of similar pages.

Build times can be annoying. I have a bicycle shop's website in Hugo, full generation takes about a few dozen seconds, upload using rsync easily a minute because of many nested directories with images. I ended up writing a script to only upload changed html and new images unless needed.

Re: No longer writing my own damn HTML

#14
My main issue with writing html directly is that it's not a writing workflow. I write in my notepad, or in my notepad.exe or word about lots of things, only a few of which I would end up publishing, so htmlizing was always a publishing step that starts with a source material. From that it naturally follows that it can be easily automated, and html is a great format for this in theory, but even as a programmer WYSIWYG is so powerful, I'd rather write in Word or notepad exe and THEN annotate what are the headings and etceteras.

If you truly write directly in html, you are probably going to be writing about html or webdev, as your mind is in that headspace, and you have to tweak a lot of html stuff so that's what you get to talk about. Once you let go a bit of that primitive purism you realize you are free to think about whatever the fuck you want.

That said I have a lot of love for speaking about the medium. When I'm feeling cynical, it feels dumb to speak about anything other than the medium. It makes sense to me that half of the discourse on twitter is about elon musk, at least it's transparent in its topical bias, on typical media the topical bias gets rerouted and engineered through ads so that you can "focus on the actual content" which is kind of dumb, I guess, I find the ads end that keep the lights on end up being more important than yet another mindless sitcom.

So yeah, I'm torn. But whichever path is chosen, going through this drama of self hosting, tech minimalism and reinventing the wheel, is a key signature of the tech blog, it really shows the identity of the author and the work they've put into the mix of their ideas and their web space, in a way that, say, a wordpress instance, cannot fulfill.

Re: No longer writing my own damn HTML

#15
What I did was store my Obsidian vault in my website server folder. Then I instructed Cursor to make all /whatever.md markdown files in there show up as HTML when you visit "/whatever" , and to get all the obsidian features like [[links]] and ![pics] and all rendering right. It used php and some apache settings. Works great. Now I just edit in Obsidian, and it all appears on my .com live as I type. Very low friction. I did see Hugo, Jekyll, & Pelican do similar, but it was straightfoward enough to just do it from scratch with Cursor, customized how I liked it.

Re: No longer writing my own damn HTML

#16

I run my personal site off of Hugo. You can load some decent themes and adding new content is a relatively painless process. But I do feel like there is a cost to using static site generators. Raw HTML is easier to work with if you aren't dealing with a lot of similar pages.

[deleted]

Re: No longer writing my own damn HTML

#17

I run my personal site off of Hugo. You can load some decent themes and adding new content is a relatively painless process. But I do feel like there is a cost to using static site generators. Raw HTML is easier to work with if you aren't dealing with a lot of similar pages.

Build times can be annoying. I have a bicycle shop's website in Hugo, full generation takes about a few dozen seconds, upload using rsync easily a minute because of many nested directories with images. I ended up writing a script to only upload changed html and new images unless needed.

You know there was a time when we had to wait dozens of seconds for the modem to finish its handshake before you could do anything.

Re: No longer writing my own damn HTML

#18

Earlier quoted context omitted.

I did think about that! However, I didn't like the idea of making the client side do work to make up for my own poorly-managed website. Forcing users to run code just to render some boring text seems like a waste.

Hmm - what is the actual cost incurred by the users here? Mostly battery right? Is that not virtually inconsequential to each individual? I mean you could sum it all up and compare it to human-hours or something but that's not a useful metric because it's distributed. Personally I think it's better to distribute the workload across clients. We'll probably see purely client driven UI's dominate the future. Imagine use…

Please, no. Don't use a SPA to render a blog, that's awful.

Browers already give users near complete ability to customize how web pages are displayed and SPAs usually make this worse not better.

The actual cost is forcing users to run javascript, with all its privacy leaks and security issues, to view what should be a static HTML document.

Not to mention the issues you create for battery life, network traffic, caching, etc just because you are too lazy to develop properly.

Re: No longer writing my own damn HTML

#19
post #14

My main issue with writing html directly is that it's not a writing workflow. I write in my notepad, or in my notepad.exe or word about lots of things, only a few of which I would end up publishing, so htmlizing was always a publishing step that starts with a source material. From that it naturally follows that it can be easily automated, and html is a great format for this in theory, but even as a programmer WYSIWYG…

Everyone loves to gripe about Markdown, but I think this the killer feature which keeps it so prominent: it's right at the sweet spot of staying in a writing workflow while still having enough formatting capability to cover ~95% of use cases. Despite all the complaining, I don't expect it to be replaced any time soon and I think all my notes and writing will be in Markdown for many years to come.

Re: No longer writing my own damn HTML

#20

After many iterations of tools, systems, and processes, I have settled on writing in plain text, in Markdown, to identify headings, paragraphs, quotes, images, etc. My reasoning and approach is that I or someone should be able to read it as it is and then have a tool parse it to spit out HTML for browsers, helping others read it with a better experience. With thousands of posts, it would be complex for me to maintain…

same here.

Besides you can directly embed any HTML inside markdown.

Post reply on HN