Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed markdown (md) into HTML

I need help embedding a markdown, or *.md, file inside of an HTML index file. I have found that I can embed HTML inside of markdown, but not vice-versa. This would help to increase the speed of my editing because markdown format is extremely easy to use, (as I'm using it now) and I don't have to change the format of the rest of my site. I know that something like this is done to embed another HTML file with <iframe src="path/to/html>html-name</iframe>. I could also use javascript to interpret the md format on page load. Thanks ahead of time.

like image 665
Jacob Birkett Avatar asked Oct 21 '15 03:10

Jacob Birkett


1 Answers

https://github.com/zhlicen/md.htm An example of zeromd.js Just serve the md.htm file and md files, and visit directly by url:

/md.htm?src=README.md

Live demo: https://b.0-0.plus/blog/md.htm?src=https://raw.githubusercontent.com/microsoft/vscode/main/README.md

like image 185
zhlicen Avatar answered Sep 21 '22 11:09

zhlicen