Live data from Hacker News

We should have Markdown-rendered websites

ipfs.io

131–140 of 351 posts

Re: We should have Markdown-rendered websites

#131
post #39

Earlier quoted context omitted.

> Perhaps a mode where you tell the browser to ignore any CSS or Javascript; possibly also in this mode the browser could use better more readable standard html rendering, similar to what most markdown renderers choose by default (bigger font sizes and line-height, more and more even whitspace around headings, maximum page width, etc), instead of the legacy choices they are now sticking with for backwards compat. Isn…

Oh, I was thinking of a mode that the _page source code_ would trigger somehow, instead of the client triggering on a page that was possibly written to be full of complex CSS and JS. But also, maybe? It does seem related to OP. I am just brainstorming, don't have anything particularly thought out. I don't personally use any "reader mode" much.

Such a mode would be… a CSS stylesheet.

Re: We should have Markdown-rendered websites

#133
post #105
post #48

This doesn't really make sense, for a couple reasons... There are many flavors of markdown. We'd need a standards body, compatibility suites, etc., and for all the browser vendors to adopt it. Meanwhile, markdown is designed to transform to HTML, which browsers already render. Adding a markdown-to-html plugin/step to your web server or publishing process is not exactly the most burdensome thing, relative to everythin…

I can't meaningfully distinguish any of these criticisms from some you could have made about HTML earlier. None of these are deal-killers.

The difference is 30 years of websites and tools being built on HTML. There's an opportunity cost to consider: is formatting simple websites in Markdown and rendering them natively that much more valuable than simply writing them in HTML or using a Markdown-to-HTML tool that it's worth the cost of creating standards, implementing them in browsers, etc. as opposed to putting those efforts elsewhere?

If you were starting from scratch, maybe. But it seems like we've already reached a point where existing solutions for Markdown-to-HTML get you almost all of the value and none of the cost.

Re: We should have Markdown-rendered websites

#136
post #105
post #48

This doesn't really make sense, for a couple reasons... There are many flavors of markdown. We'd need a standards body, compatibility suites, etc., and for all the browser vendors to adopt it. Meanwhile, markdown is designed to transform to HTML, which browsers already render. Adding a markdown-to-html plugin/step to your web server or publishing process is not exactly the most burdensome thing, relative to everythin…

I can't meaningfully distinguish any of these criticisms from some you could have made about HTML earlier. None of these are deal-killers.

The difference is that HTML already exists and browsers support it.

For browsers to also support markdown, there should be some use case that isn’t already well-supported.

Re: We should have Markdown-rendered websites

#137

You already can render markdown. It shows as what it is: text. If you want to render markdown as something else, you need to define what that other thing is. If you're suggesting we render it as a webpage, well webpages are made of HTML and CSS--so you're saying you want to render markdown as HTML/CSS. We can already do that. There are a plethora of tools available to do that.

[deleted]

Re: We should have Markdown-rendered websites

#138
post #48

This doesn't really make sense, for a couple reasons... There are many flavors of markdown. We'd need a standards body, compatibility suites, etc., and for all the browser vendors to adopt it. Meanwhile, markdown is designed to transform to HTML, which browsers already render. Adding a markdown-to-html plugin/step to your web server or publishing process is not exactly the most burdensome thing, relative to everythin…

> There are many flavors of markdown. We'd need a standards body, compatibility suites, etc., and for all the browser vendors to adopt it. Well, if it were to be adopted by vendors, the many flavors would be a non-problem. They can just agree on a flavor and be down with it. There's CommonMark anyway, they can just use that.

Except that CommonMark has its own very annoying things. Like loose lists. Multiple lists of bullet points ends up an ugly mess with CommonMark.

Re: We should have Markdown-rendered websites

#139
Deliver as markdown, but with a single line header:

  Foo
  [[insert your markdown here]]
A document delivered as pure markdown, that will get spidered by any search engine that renders JavaScript (or that reads the document as text), and you don’t need to ask anyone to change anything. HTML has no closing end tag, so markdown can be free-form and securely include any unescaped ”’ characters (raw HTML code) you need into your markdown and the browser will treat it as pure text (unlike the tag which can be ended with - even weirder lexing).

The key is that although the tag is deprecated, every browser has to support it (partially because removing support for would cause security issues for existing pages!) The tag is really very special, quite different from any other tag, and it radically interrupts HTML document lexing/parsing.

Use something like https://whatismarkdown.com/how-to-have-markdown-in-realtime-... to read the content of the and dynamically render your markdown into HTML.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pl...

Edit: and of course there is the HTTP header Content-Type: text/markdown which could be used by browsers to render a markdown document - see “The text/markdown Media Type” RFC https://www.rfc-editor.org/rfc/rfc7763.html and https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Co...

Re: We should have Markdown-rendered websites

#140

Earlier quoted context omitted.

I get this, but OTOH it is IMO best to distribute digital artifacts in the format that is most useful for editing or creating derivative works. This is the free software philosophy but also a societal good. Many of us learned HTML and web technologies by reading the source code of websites, and we've closed that door behind us with all of the build steps that turn our actual code into a computer-readable-only mess wh…

you can distribute websites as markdown! Return markdown with a plain text content type and it'll show as markdown, which was designed to look good as-is and not require rendering to HTML

This is a really good point. (I should have/wish I had brought it up in my original post!
Post reply on HN