Hacker News new | ask | show | jobs
by josephg 556 days ago
So? I could write my blog post in raw HTML without using any markdown at all. But we don't, because raw HTML is a bad tool for composing rich content.

The kind of things I want to be able to do (that markdown makes hard):

- Make a standard component for embedded images, which supports clicking the image to see it full-screen.

- Make "boxes", showing certain kinds of content. This is useful for diagrams, commentary, code, formulas, and more depending on what you're doing.

- Run code when building the page which can load external data and display it however I want. For example, I wrote a paper using typst recently. I have some data in a JSON file. My typst paper contains code to read in the JSON file and embed some of the values into a table in the output.

- Embed raw SVGs into the output, in an svg tag.

- Have programmatic content - eg, onclick handlers, hover states, etc.

- Make a table of contents (I think GFM supports this, but I don't think its a standard markdown feature)

- Have generated section titles (Eg "3.a Benchmark results")

- Make a webpage which contains content from a lot of markdown files in a folder. Each of those files may need custom ... well, everything.

- Use custom CSS styles. Styles might be local (just this element) or global across the page.

- Use extensions / plugins for things like programmatic diagrams

Raw HTML is a complete non-answer to this stuff. Its the sort of answer that makes me question if you've done any serious writing at all. Like, your comment reads to me as the writing equivalent of arguing that C is the best programming language because - if you need anything thats not in C, you can write it in assembly.

What I really want is some combination of markdown + react. Typst is close - or, it will be close once it supports HTML output. But markdown simply isn't powerful enough for serious writing.