You can do that with gemini. It will serve whatever MIME type, and you could have a server that serves markdown files.
For that matter you can serve images or whatever binary files as individual requests (that is, not inline with another repsonse).
I've been playing with it and I rather like it.