There are already tools doing similar thing:
https://www.sharelatex.com/
https://latexbase.com
https://papeeria.com/
The first and third tools require you to sign up. How exactly do you create a distributable Markdown file there that can be read both in editor as text and viewed as HTML in browser? The second link does not recognize Markdown.