What does HackerNews think of mdx?

Execute code blocks inside your documentation

Language: OCaml

This concept sounds quite a bit like the usage of .mdx files in OCaml. Those are markdown files which can load and execute OCaml code in them.

They are useful for unit testing code like libraries, providing usage examples for end-users (as well as the text format markdown usually supports) and testing it at the same time. Definitely a great idea for documentation, and one which I should use more of.

https://github.com/realworldocaml/mdx