Nice, but why does this needs JS to be rendered ?
If you were to use e.g. org-mode for the source document, you could easily export to HTML automatically when the file is saved.
You could also easily use a git hook to run e.g. pandoc to convert md to HTML automatically.
There are many ways of automatically exporting HTML when you save the md source file. Please use one.