Live data from Hacker News

Next Gen Static Blogging

inoads.com

101–110 of 179 posts

Re: Next Gen Static Blogging

#102
post #30

Note that closing tags are optional † , so one can be an HTML purist and still write a decent HTML document with a relatively clean markup like this: Lorem Ipsum Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis id maximus tortor. Sed nisi ante, fermentum vel nunc et, tincidunt sagittis magna. In ultrices commodo lacus, id tristique ipsum euismod laoreet. Maecenas at neque posuere, aliquet era…

Frontend developer here -- Although you could omit the closing tags, I don't see the benefit of doing so. If you know HTML, nesting is fundamental and not explicitly closing dom nodes would lead to confusion. You would also need to concern yourself with the "certain conditions" that must be met for it to work. Consistency and clarity over brevity!

I write plenty of HTML by hand, for myself. I prefer to omit things like

, , and , because it takes less effort (and I hate text editor plugins that automatically add closing delimiters of any form, because they always do the wrong thing a meaningful fraction of the time in a way that I have to think about, more than if I just type the delimiters myself, though an accurate “insert at the cursor whatever is needed to close the last thing” shortcut might be handy), and reduces visual noise.

I also normally omit quotes on attribute values if correct to do so.

I mostly do these things when working on things of my own, when I know no one else needs to worry about them. When working on things others will touch, I don’t drop quite as many closing tags, and will normally leave attribute values quoted.

Re: Next Gen Static Blogging

#103
post #6

If I'm understanding correctly, here, the semantic value of the element is ignored to increase DX. I personally wouldn't make that compromise, why is pre-processing not simple enough?

The outer here is simply a very poor choice due to what I can only imagine is ignorance. It would be better removed, and the `code` rule in the stylesheet changed to `body` and `font-family: monospace` added. (And `code code` would need to be changed to `code`.)

Re: Next Gen Static Blogging

#105

If you're into the monospace look, .txt is cool too.

For the web plain text is pretty terrible. Web browsers are terrible plain text readers, mobile browsers doubly so.

Browsers render content in a "viewport". On the desktop the viewport width is the width of the window but on mobile defaults to 960 CSS pixels (pixels adjusted for screen DPI). When a page is rendered it's as if the browser window is 960px wide. This can be controlled with the viewport meta tag where you explicitly tell the browser the viewport is the window width, on desktop browsers that doesn't change anything but mobile browsers use their screen width rather than the default.

When it comes to plain text there's no way to tell the browser to do that. So if the plain text doesn't have a hard column wrap it's rendered as if it's in a 960px wide window. If it is hard column wrapped it's probably to some common terminal width like 40 or 80 characters. At 80 characters the default font size ends up causing really awful wrapping in the viewport. Pinch to zoom doesn't change the font size but the viewport magnification do that doesn't help readability.

You also lose hyperlinks and in-line images. The web could do with fewer stupid images bulking up pages but without hyperlinks you don't really have a web. Putting all links at the bottom of a document HN style isn't a great solution. Visitors still need to copy and paste links which is a pain in the ass at best and inaccessible at worst.

If you want a monospace "look" just put 'body {font-family:monospace;}' in a style tag and you're all done. You get all the benefits of a real HTML document and the terminal chic of a monospace font. Don't waste everyone's time with plain text on the web.

Re: Next Gen Static Blogging

#106
I applaud that simplicity seems to be trending, but the benefits of not having paragraph tags don't seem to outweigh the downsides. It's not that big of a deal, and it enables reader mode.

Leaving as much as possible left to default is what I prefer; it supports the greatest number of browsers and assume is the fastest. https://www.quitfacebook.org/file/play.html

Re: Next Gen Static Blogging

#107

I'm glad I'm not so blind that I need a screenreader for this site, because @mmackh doesn't seem to have given any consideration to accessibility. https://wave.webaim.org/report#/https://inoads.com/articles/... If this is "next gen", I think I'll stick to using emmet-mode in Emacs to write raw HTML, templating with m4 macros, validating with tidy, and doing the build and deployment with a makefile.

Made me realize my own site needs work. Thank you for sharing this

Re: Next Gen Static Blogging

#109
post #30

Note that closing tags are optional † , so one can be an HTML purist and still write a decent HTML document with a relatively clean markup like this: Lorem Ipsum Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis id maximus tortor. Sed nisi ante, fermentum vel nunc et, tincidunt sagittis magna. In ultrices commodo lacus, id tristique ipsum euismod laoreet. Maecenas at neque posuere, aliquet era…

It would be valid, but wouldn't Google penalize it for being poor html?

Re: Next Gen Static Blogging

#110
post #30

Note that closing tags are optional † , so one can be an HTML purist and still write a decent HTML document with a relatively clean markup like this: Lorem Ipsum Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis id maximus tortor. Sed nisi ante, fermentum vel nunc et, tincidunt sagittis magna. In ultrices commodo lacus, id tristique ipsum euismod laoreet. Maecenas at neque posuere, aliquet era…

Frontend developer here -- Although you could omit the closing tags, I don't see the benefit of doing so. If you know HTML, nesting is fundamental and not explicitly closing dom nodes would lead to confusion. You would also need to concern yourself with the "certain conditions" that must be met for it to work. Consistency and clarity over brevity!

The man who collects rocks in his pockets eventually drowns.
Post reply on HN