Using Markdown as HTML

  • I have taken a look at the .mdhtml file and don't know what you mean ;(

    I you mean having one file that can contain both markdown and HTML, that's what markdown is already, since you can fallback to inline or block-level HTML in markdown.

    If OTOH you want a HTML file that can also contain markdown (or other custom Wiki syntax, and text substitution variables, and a whole lot more), than that's available in SGML (on which HTML is based) via short references.

  • Isn’t texme doing what you suggest here? Or am I missing something?

    https://github.com/susam/texme

  • Not the same thing, but have a look at the Gemini [0] protocol. It uses a markup format called Gemtext which is similar to, although less featureful than Markdown. All pages are written in and served as gemtext. There's almost no rendering done, unless your client is configured to use custom stylesheets.

    [0]: http://gemini.circumlunar.space/

  • It’s an interesting concept. But for me personally I don’t see any practical benefits of using it.

    On my web pages I use Hugo. Conversation is done when the CI/CD system runs Hugo.[1]

    [1] I currently use AWS Amplify. But it’s not hard to build a small Bash script to replace it.

  • Sounds like a terrible idea. You loose the fallback, because Markdown treated as HTML instead of text is pretty much unreadable. (block the script to see what I mean: the rules about newlines etc in HTML do work differently)

  • Markdeep[0] could be an option for what you are looking for.

    [0] https://casual-effects.com/markdeep

  • Have you tried using pandoc to convert markdown to HTML?