Live data from Hacker News

We should have Markdown-rendered websites

ipfs.io

11–20 of 351 posts

Re: We should have Markdown-rendered websites

#11
post #5

OK. Which flavor of markdown should we get every browser manufacturer to use?

I made a comment about how to do this as my very first HN post on this account[1] in a code-golf-y sort of thread:

Here's the example:

    # Markdown header

    ## Subheader

    ### Section header

    1. Numbered
    1. List

    - Unordered
    - List


    [//]: # (var doc = document.children[0].textContent.split('\n'); md = doc.slice(0, doc.length - 1).join("\n"); document.body.innerHTML = marked(md);
Now, whether this is wise to encourage or not I can't speak to.

It would be great if browsers parsed markdown as text-only

[1]: https://news.ycombinator.com/item?id=25352385#25355751

Re: We should have Markdown-rendered websites

#12
post #5

OK. Which flavor of markdown should we get every browser manufacturer to use?

Let's just embrace the chaos and develop a new flavor for every browser until there are precisely 31 different flavors of Markdown. We cap it there, Baskin Robbins style, and then watch the world burn.

Re: We should have Markdown-rendered websites

#15
Part of the benefit of Markdown is that you can view the raw source and still get useful info out of it. But this site prerendered the Markdown and served HTML which defeats part of the purpose.

A better option would be to use something like https://casual-effects.com/markdeep/ and serve the MD/HTML file. Then you can get a client-rendered HTML (https://casual-effects.com/markdeep/features.md.html) or view the raw MD (https://casual-effects.com/markdeep/features.md.html?noforma...) if the browser doesn't support HTML.

Markdeep is good at progressively mixing HTML & MD so you can choose how much of each to put in to your page. I use it for mostly MD + MathJax notes + some HTML/JS/SVG/Canvas/WebGL for when I want dynamic graphics in my notes.

Re: We should have Markdown-rendered websites

#16

Recently there was a thread about GitHub Blocks, interactive elements within READMEs and Markdown files in general. If we could standardize that and support it, that would be cool. Also, isn't this basically what HTML does anyway?

You mean stuff that is already standardized and in Asciidoctor? That would be easier than trying to wrangle in all of these forks/flavors with all their incompatible extensions and tools all while have no way to handle metadata?

Re: We should have Markdown-rendered websites

#18

isn't this why HTML was invented? agree that it'd be nice to have a markdown file be rendered inherently within the browser so i don't have to use haroopad on my windows machine, but it feels like we're just going to reinvent HTML

Agreed, original HTML was not too different than markdown really. (But more standard, and slightly more powerful with things like tables, code blocks, and definition lists, all of which are only non-standard extensions to markdown!)

Maybe what OP really wants is a lot more people to write HTML without _any_ CSS or Javascript. But that's already more or less available, so there are reasons people don't do it to grapple with.

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.

Re: We should have Markdown-rendered websites

#20
HTML is already a markup language. You could just as easily make basic websites using HTML and some basic inline CSS.

(They’d even have some extra features missing from Markdown that I’d consider still part of a basic content formatting suite like floating or multi-column layouts. They’d even have a defined standard for machine readable metadata!)

The problem is that people don’t make websites like that very often, even though they can. This is trying to solve a problem that doesn’t currently exist.

Post reply on HN