Live data from Hacker News

Next Gen Static Blogging

inoads.com

21–30 of 179 posts

Re: Next Gen Static Blogging

#21
post #13

Earlier quoted context omitted.

What about them? They occur exactly once, and I probably have a prepared file with them already in it. But for every paragraph I write I need to type (and maybe even , if I choose to). That's exactly the use case for Markdown, to get rid of that tedious stuff.

A lot of modern text editors will let you type 'p' and then tab and they will create the opening and closing tag for you.

Sure, I can type "Look, I don't hate hand-written HTML. I actually like it better than Markdown.

Re: Next Gen Static Blogging

#22

Interesting concept. This seems to simplify the writing part. What about the rest? Is the list of posts generated automatically (if so, how?), or does it require manual management? Do you need the code tag, or could it be something more semantically relevant, such as article?

You can have it auto-generated using directory indexes in Apache. You can even customize them (within limits).

I've toyed with having a minimal blog, where I simply drop text files with file names beginning with their date in a folder and rely on directory indexes as a "home page".

Re: Next Gen Static Blogging

#23

A neat little css property aside, isn't the separation of concerns a cornerstone of web pages? Html - structure of the document CSS - appearance JS - interactivity I could be wrong, but that's how I remember it. Is there an advantage to moving away from this fairly simple and unambiguous paradigm?

Separation of concerns is still seen as the way to go. People just have different opinions about what a concern is.

It started with markup, styling, and interactivity. But many people think, this is a too technical perspective and software should be split up into non-technical concerns (i.e. microservices).

Re: Next Gen Static Blogging

#25
post #12

Earlier quoted context omitted.

What about the standard ... ... tags?

All of those tags are optional. It’s perfectly valid to omit them.

Not according to w3.org's validator. https://validator.w3.org/nu/?doc=https%3A%2F%2Finoads.com%2F...

Edit: Actually, seems you're right. Though doctype is not there, and there are other problems with the markup.

Re: Next Gen Static Blogging

#27

Cool. Go one step further and render the CSS inline. Of late, I have been writing with just MarkDown and dropping in some of the simplest tool (Pandoc, Jekyll) possible to render as HTML.

Here's some crazyness: https://dataswamp.org/~solene/2019-08-26-minimal-markdown.ht...

I suppose it is not much hard to translate this into PHP...

Re: Next Gen Static Blogging

#28
post #10

Agree that static blogging is nice, but I think this specific look needs some tweaking - for example, there's too low contrast in color between the links and the background at https://inoads.com/blog

I had to copy all the text out into a text editor to be able to read the article, not just the links. Contrast is out of vogue I guess.

Re: Next Gen Static Blogging

#29
post #17
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?

You could use instead (which I probably would). Jest tested it using dev tools, seems to work.

Using some HTML elements like section makes Safari switch to "reader" mode. Which is broken.

Re: Next Gen Static Blogging

#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 erat at, vehicula est. Duis aliquet elit et arcu laoreet, id pulvinar eros pretium. Quisque consectetur, enim semper facilisis feugiat, velit sapien semper arcu, eu mollis libero est et odio.

Curabitur fringilla interdum ante vel ultricies. Mauris volutpat nisi sed turpis elementum elementum. Mauris nec eleifend lorem. Sed ac vulputate libero.

A valid HTML5 document does not require explicit , , or the closing

, tags. See the spec for optional tags at https://html.spec.whatwg.org/multipage/syntax.html#optional-... for more details. Similarly, the markup for lists and tables can be cleaned up too because the closing , , , tags are optional.

Note that the opening tag is optional too but I retained it in the above example to specify the lang attribute otherwise the W3 markup validator warns, "Consider adding a lang attribute to the html start tag to declare the language of this document."

† These tags are optional provided certain conditions are met. See the spec for full details. In practice, one rarely has to worry about these conditions.

Post reply on HN