There appears to be many comments here, arguing that authoring web content in markdown is nothing new, and correctly so.

But this (along with md-page and mdwiki mentioned in other comments) is actually an interesting small twist on it. Regularly the conversion is done on the server side, and everything is published in html.

Here, you both author and publish in markdown.

What this library does, if I'm reading it correctly, it acts as polyfill that lets legacy evergreen browsers to consume the markdown files that you serve.

You can publish your content in a bit more simpler, yet still declarative format, without any javascript, and still make it accessible, in a properly rendered format, for evergreen browsers.

(Yes, you can still add javascript to markdown files, but it is relatively easy for the agent to just discard any javascript or html.)

The markdown is the source of truth here. No need for rendering everything twice for serving, once for html and once for markdown, and creating a point where their content might diverge.

It's straight out of gemini's playbook.

I think this is a wonderful idea, and if developed a bit further, and adopted more widely, could help push markdown to be a properly supported format in modern browsers.

The next question is, how would you get the second layer of github flavored markdown fluff (latex, mermaid, etc), that is generally not standardized, to be supported in browsers as well?

This requires JavaScript to dynamically serve HTML. So this wastes everybody’s CPU for a deterministic computation that could be served directly.

I’m not sure what’s the use case for this, but for static content seems wasteful and a bad idea in general.

The Grav CMS also internally uses Markdown for the page contents and generates static files:

They do use YAML FrontMatter for attaching metadata so the CMS knows how to process certain pages (e.g. page title, page type etc.), but it isn't too complicated in practice:

They also have an admin plugin, which you can use if you prefer a more traditional workflow, even if it just generates the same file format under the hood:

I'm actually using an ancient version of Grav for my own blog, although I had to put the admin path behind additional auth (in addition to the one it already provides), for safety:

I really like hybrid systems like that: a CMS for blogging or just writing in general that's based on Markdown, generates static files for decent performance, but is also extensible with additional functionality, and also has a decent web UI if you want one.

(there are probably other CMSes like that out there, or more generic solutions, too)

Of course, the actual use case for the linked solution is a bit different, being able to dynamically render Markdown client side is also pretty cool! Feels almost more flexible in a way.

I use this one which is also nice:
Don’t forget, Caddy can also serve markdown directly via module:

Believe there may also be something similar for Apache?

Unfortunately it won't display without JavaScripts. You can easily fix this by a <noscript> block with the link to the Markdown file; if it is not possible, instead include a description about how to find the Markdown file.

Another alternative that I would suggest is to just serve the files directly (in Markdown or Gemini or PDF or whatever other format they might be). To allow working in a web browser, one idea is to try to implement my idea of a Interpreter response header in web browser, which would be used if the web browser does not understand the file format (if the user has not disabled the use of the Interpreter header). This way, potentially any file format can be implemented.

There is also question about different variants of Markdown. Well, the way to indicate that is by parameters in the MIME type, I think; you can specify if it is Commonmark or something else. This way you can tell which variant it is.

One problem with MIME is that indicating multiple file formats does not work very well. UTI specifies that it is a specific kind of another file format but it must be specified in another file instead of this one and does not have parameters, and has other problems, so UTI is not good either. That is why I wanted to make the "unordered labels file identification" which you can specify, in the same identification, multiple types/parameters, e.g. "text[367]:plaintext:markdown+commonmark".

Great idea. Keep expanding it as you have time.
I'm doing something similar for my personal notes but I combine .md and .html into 1 file. My .html file looks like this:

      <div class="accordion">
        <div class="accordion-item" title="...">
          text with markdown syntax goes here
        // use showdown.js to convert the innerHTMLin .md syntax to html code
        // use bootstrap to make the accordion-item collapsible/expandable
        // use js to make a floating TOC
If anybody uses both showdown.js and this casual-markdown.js, could you give some comments?
org-mode already has this. Unfortunately, people seem to continue to use the inferior version of org known as Markdown. It is somewhat like how pdf overtook the superior format djvu.
I use Markdeep for the same application:

I did something similar, but for adding a blog system to a server running PHP:

The idea is that having it server-side allows for the page to be cached by a CDN (e.g. CloudFlare), so you end up serving static HTML, with better performance and SEO than JS-compiled markdown.

The heavy lifting seems to be actually done via:

Which isn't in the github repo.

What about Markdeep? Astonished that none of the commenters here seem to know of its existence. See
I visited the documentation site on a slow mobile connection and it took a long time and even a refresh to load. This seems to be a bad way of doing something that has been solved by static site generators for a long time.
Do you have any examples of what a web site would look like with this?
I was under the impression that using markdown to create html webpages was a common use case, and had been solved. Was I wrong?

(I've used markdown for note taking, not for web pages, hence am asking.)

Why not rendering a whole site from markdown to HTML in a Cloudflare worker (with cache) instead of on the browser? SEO would benefit too.
I've been using docsify in this manner for a while and it's worked well for me
What's the reason for supporting IE9?
This reminds me of MDWiki: