Live data from Hacker News

We should have Markdown-rendered websites

ipfs.io

221–230 of 351 posts

Re: We should have Markdown-rendered websites

#221
post #209

The author is lying. The source isn't actually a markdown document, the source is HTML (you can easily verify this by right-clicking and selecting "View Source") It's actually quite easy to actually render markdown pages in a browser. Start with this: ## MarkDown *HERE*!!!!! and "notes-all.js" contains something like this: document.write(' ')); document.addEventListener('DOMContentLoaded', (event) => { var m = markdo…

I think the author means that they wrote a markdown document, which then was transformed (by a CI/CD pipeline, for example) to the html you see when you inspect the source.

I like your "Serve markdown, transform through a client-side script" approach though, so upvoting nonetheless.

Re: We should have Markdown-rendered websites

#222
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…

> markdown is designed to transform to HTML

Is it though?

Re: We should have Markdown-rendered websites

#224
post #32

Earlier quoted context omitted.

HTML is a subset of Markdown. You can include in Markdown any and all HTML. What Markdown provides here is an even lower barrier to entry for the majority of people... they just write text, learn a fraction more Markdown to so more... and if they want total control they eventually learn HTML too. It's not mutually exclusive... Markdown includes HTML.

—I’d say it’s the other way around isn’t it? Wouldn’t Markdown be a subset of HTML, since all markdown can be expressed in HTML but not all HTML can be expressed in Markdown?— Edit: Markdown can contain HTML that gets meaningfully interpreted as markup as well. I’d also say HTML is not difficult to write, even for someone new to the concept. I don’t think anyone making their GeoCities homepage was too strained learni…

You’ve got it backwards. Markdown is a superset of HTML.

Markdown specific syntax is not valid in HTML pages, but all HTML is valid in Markdown.

Re: We should have Markdown-rendered websites

#225
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. HTML has had the exact same problems. You can say "CommonMark spec" and it's solved, isn't it?

Part of the reason for standards committees, is that just saying “this flavour” is not enough to convince everybody.

Standard is not only specification, but also tacit agreement by many parties to use same standard.

People that have skin in the game usually want a say on what flavour should it be.

Re: We should have Markdown-rendered websites

#226
post #120

Earlier quoted context omitted.

Interestingly, your comment is very similar to the Gemini FAQ "2.9 Why didn't you just use Markdown instead of defining text/gemini?" [1] [1] https://gemini.circumlunar.space/docs/faq.gmi

https://xkcd.com/927/

Gemini it's the needed standard between Gopher, tied to small devices with a 80 column display, and the Web with enforced encyption for security but without requiring lots of resources.

Re: We should have Markdown-rendered websites

#227
My personal website is done similarly. I built it on top of markdown and added my own shortcodes so I could add macros and custom plugins as I added.

The site code lives separate from the post, media, and general 'content' and doesn't care what content is provided.

Re: We should have Markdown-rendered websites

#228
I like Markdown and use it at work, but I think Asciidoc is a better markup language because it is more consistent and has support for more things than Markdown does (e.g., better table support, callouts, tips, etc.).

I currently use 11ty with the Asciidoc plugin for building websites. This setup is nice because I only have to fiddle with HTML and CSS during the design phase. Once that's done, nearly all my website maintenance is done in Asciidoc. Easy!

I don't think I'd want to directly write an entire website in either Markdown or Asciidoc. I think, eventually, doing so would result in these markup languages becoming as cluttered and weird as the HTML/DOM/JavaScript/CSS mess is now.

I think a better step to improving HTML and CSS would be to have the browsers support Slim (https://github.com/deepin-community/ruby-slim) and Sass out of the box instead. That would make my design phase less wordy and redundant while keeping my Asciidoc experience nice and tidy.

Re: We should have Markdown-rendered websites

#229
post #195
post #92

You could presumably just add a single line of JS to a markdown file that would render it as HTML.

There is strapdown: https://github.com/chaitin/strapdown-zeta/blob/master/README... ``` Hello, Strapdown # title your awesome markdown content goes here... " rel="nofollow">http://cdn.ztx.io/strapdown/strapdown.min.js"> ```

Interesting, but I feel like ven this is over built.

    # Hello World

Re: We should have Markdown-rendered websites

#230
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…

For people considering adding Markdown support to web browsers or other publishing tools, please consider adopting Djot instead: https://github.com/jgm/djot It's very similar to the Markdown syntax we all know and love/hate, but fixes many inconsistencies in the spec, and also makes it possible to parse a document in linear time, with no backtracking. It is also much fuller-featured than commonmark, with support for…

The primary goal and appeal of Markdown is that it is easy to write. Optimizing for parsing is creating a fundamentally different product.

Standardization of the spec is good. Requiring quirky behavior and blank lines that hurt reading is bad.

Post reply on HN