Live data from Hacker News

No longer writing my own damn HTML

claytonwramsey.com

71–80 of 98 posts

Re: No longer writing my own damn HTML

#71

Earlier quoted context omitted.

Why would you need JS for any of that?

how else can I have a fullscreen overlay navigation on a phone from an accessible toggle button? almost forgot to answer the question: because I don't know any better

You can do a lot with CSS these days: https://css-tricks.com/the-checkbox-hack/

Re: No longer writing my own damn HTML

#72

You actually skipped making an adhoc site generator of your own. Make a 5 line shell script to do steps 1 and 2 for your entire site. Then the content is just a few paragraph and link tags. Throw in a call to markdown if you want to get fancy.

Back in the day I'd use a WYSIWYG editor to design a front page and navbar and whatever, then split each part into header, nav, footer files and have code spit out the template HTML in the correct order with "body" file chosen by the URI

This is static site generation? I had another name, basically it was CMS for people that used ms word to type blog posts

Doing this again with a markdown step sounds cool

I think a real cms just has like tag engines and the ability to group posts and that sort of thing. But a site where everything is chronological; and otherwise only "wicked" - linked via potholes in posts is really all I need.

Maybe. I do need 2 blog sites here soon. I'll try templating for one and a ssg for the other maybe.

Re: No longer writing my own damn HTML

#73
post #32

I don't understand your hangup about using JavaScript to accomplish tasks that JavaScript is extremely well-suited to do. The idea that you are somehow imposing a burden on your visitors is an imaginary constraint which is actively consuming the finite minutes you have on the planet. This is a pyrrhic victory. I am not advocating using SPAs of any kind, especially in a blog context. However, if there is a library whi…

The ideal amount of JavaScript is zero.

It is for documents but we have web apps that are not documents.

Re: No longer writing my own damn HTML

#74
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.

I only have 1 markdown editor, in nextcloud. Is there an app that let's me write markdown and then save as .md for publication by something that makes that HTML?

Re: No longer writing my own damn HTML

#75

Earlier quoted context omitted.

> Not to mention the issues you create for battery life, network traffic, caching, etc just because you are too lazy to develop properly. This is a very uncharitable take. It's because I know how to develop properly that I want to send the repeated content of the site to you just once; the header, topnav, lhs-nav and footer will be cached if JS is enabled. The cost of that JS is less than the common elements anyway!

It's funny. Further up in this discussion is someone sharing their demo of using XSLT to dynamically assemble a page from parts. This process properly caches the fragments as well. No JS required, just the default rendering process for the browser. But XML+XSLT is the "red-headed stepchild" that everyone seems to hate. Writing a SPA just to recreate the built-in functionality of rendering a static page on the client…

> XML+XSLT is the "red-headed stepchild" that everyone seems to hate

One look at XSLT syntax and you learn why.

Re: No longer writing my own damn HTML

#76
post #67

Earlier quoted context omitted.

how else can I have a fullscreen overlay navigation on a phone from an accessible toggle button? almost forgot to answer the question: because I don't know any better

Actual answer: like this! https://codepen.io/Sfate/pen/kGbLzK

yep that works thank you - so to get the fullscreen overlay (since we only want it on the phones) a media query - maybe it should be the one gridcell navpage. But maybe the links should be listed for the robots ... if mobile is default/first there would be only one link - yeah maybe this is good.

Re: No longer writing my own damn HTML

#77

Earlier quoted context omitted.

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.

I only have 1 markdown editor, in nextcloud. Is there an app that let's me write markdown and then save as .md for publication by something that makes that HTML?

What do you mean markdown editor?

I thought the idea was that you can just write it as plain text in something like notepad.exe

Re: No longer writing my own damn HTML

#78
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.

Hmm, it also has display support in a lot of random websites and tools like GitHub and reddit

Re: No longer writing my own damn HTML

#79

I think the key to getting into the habit of writing blog posts is to make the actual process of writing and then publishing as easy and frictionless as possible. I use Bear app for the writing - it's a very well designed markdown editor with some really nice, simple features, such as nested tagging. I then got ChatGPT to help write some scripts to publish it via the Quarto static site generator. I wrote about the pr…

Different process, but this is my experience too. Making it super easy to go from writing to publish helps keep momentum.

Including the prompt in your write up is a nice touch.

Post reply on HN