4 ms·
Has anyone proposed CommonMark over HTTP? Like, just shove markdown in a GET response with Content-Type: text/markdown And let the client decide how to rend
by ryukoposting 3y ago
Has anyone proposed CommonMark over HTTP? Like, just shove markdown in a GET response with
Content-Type: text/markdown
And let the client decide how to render it. It'd be like Gopher, but modern.
- LoganDark 3y agoDoes Gemini[0] look interesting to you? [0]: https://en.wikipedia.org/wiki/Gemini_(protocol) https://en.wikipedia.org/wiki/Gemini_(protocol)
- arp242 3y agoGemini isn't over HTTP and it's not Markdown.
- GuB-42 3y agoGemini is like modern Gopher, but it is also very opinionated. The protocol does not support extensions and revision, it refuses HTTP, mandates TLS, etc... That's not the same as having browsers support the markdown content type.
- flir 3y agoYou might disagree about where to draw the line but you can see why they drew a line in the sand. text/markdown would very quickly grow to be everything HTML is. There's probably a pithy "every internet protocol expands until it can serve ads" lesson in there somewhere.
- 8n4vidtmkvmk 3y agoMarkdown generally does include everything HTML is (because you're allowed to write HTML in markdown)
- anon25783 3y agoI like your pithy remark! I'm calling that "Flir's Law" from now on, after your username.
- flir 3y agoI just stole it from jmz - "every program attempts to expand until it can read mail" - I think attribution might be overkill. But thanks for the thought.
- ssss11 3y ago“But but but.. how do we shove ads everywhere and track the targets?”
- lagniappe 3y agoThat's the philosphy behind Markus Docnet https://github.com/markusdocnet https://github.com/markusdocnet
- xigoi 3y agoCould we go with a format that doesn’t have so much unnecessary complexity?
- benrutter 3y agoI've never heard markdown referred to as unnecessarily complex before. Genuinely curious, what features / complexity would you strip out?
- xigoi 3y agoI’d prefer everything to have the same syntax, like in HTML (or I should better say XML). When every feature has different syntax, like in Markdown, it makes parsers much larger and leads to an extreme amount of edge cases that every parser has to handle. For example, when you see an asterisk, you have to decide whether it denotes italics, bold or a bulleted list, which might not be trivial. Generating correct Markdown from a different is also much harder. In HTML, you just need to escape all your less-than signs, ampersands and quotes. In Markdown, you need to check whether your content is going to trigger various edge cases and deal with them accordingly.
- benrutter 3y agoYeah, I guess that's a really good point. I've never thought much about it before, but you're right that the simplicity of markdown is probably more from the point of view of the human writer/reader, and is really just passing the complexity down to the parser.
- 8n4vidtmkvmk 3y agoYou don't need to escape all your ampersands and quotes. An ampersand that doesn't form an html entity will render as is, quotes are perfectly fine unless used in an HTML attribute. And in an html attribute, less thans are fine. The body of a script tag has different parsing rules.
- xigoi 3y ago
- lmm 3y agoGood luck getting the browsers to implement anything so useful. They won't even update their default stylesheets. I set up my blog with that kind of mentality - I just want to write some markdown and have the browser render it whatever way it needs to - and found a one-liner to pull in some Javascript to do that. But the kind of people who like this stuff tend to hate Javascript, so I get it from both sides.
- ryukoposting 3y agoI don't use other browsers so I can't be sure if this is widespread, but Firefox already has a "reader mode" where it cuts out ads/sidebars etc and applies its own very basic stylesheet. Markdown-over-HTTP could very easily use that preexisting frontend. > I set up my blog with that kind of mentality - I just want to write some markdown and have the browser render it whatever way it needs to I made my own blogging platform where I write Markdown, and it transforms the markdown into HTML before delivering it to the client. The only JS involved is highlight.js, and that's only loaded on posts where I specifically ask for it - the whole blog works normally with no JS at all. It's still missing some core features like RSS, but I'll get around to that.
- lmm 3y ago> I made my own blogging platform where I write Markdown, and it transforms the markdown into HTML before delivering it to the client. The only JS involved is highlight.js, and that's only loaded on posts where I specifically ask for it - the whole blog works normally with no JS at all. There are plenty of platforms that will render markdown into HTML (e.g. Jekyll); I specifically wanted to actually serve the markdown as-is, so that the "source" for any post is always available.
- ryukoposting 3y agoI've thought about adding this to my own platform. Just checking the Accept header for text/html or text/markdown, then sending them whatever they prefer. I just don't know if anyone would actually use it.
- jauntywundrkind 3y agoThis used to be something one could sketch up in a couple hours on the web, with registerContentHandler. Removed in 2018. I don't totally disagree with the reasoning, but when the web kills amazing flexibility points for lack of heavy adoption it makes me sad. There's so many good ideas that should be left in, even though society isn't actually so bloody awesome as it should be. https://groups.google.com/g/mozilla.dev.platform/c/jeTDLz38_RE https://groups.google.com/g/mozilla.dev.platform/c/jeTDLz38_... Also, scoffing at 0.2% of users of a web browser is multiple orders of magnitude away from where the line should be; these people are a fucking joke & shame the fuck on them, losers. Jonathan Kingston, what the heck dude? What the frelling heck? Also no other browsers implemented it! Adoption needed help! Not to be murdered. Tl;Dr, adding new content types used to be easy & simple & you could register a site as a content handler but they always kept the feature locked down then killed it without ever letting people go for it at all. Gatekept.
- SamuelAdams 3y agoThis would also be amazing for screen readers and other accessibility software.