spawnMd.js

Github Markdown URL to HTML

Dev website Example Github page Autonetix.co

spawnMd.js

Insert / render github markdown into HTML!

JavaScript to GET a markdown document (eg README.md) using github's REST API, from any public repo and POST it to githubs markdown API to render a finalised .md file within any HTML document.

Includes support for private repo's, an authorization token is required; generated from your github settings page.

Usage:

Just include source script to use:

<script src="spawnMd.js"></script>

And call the function like this:

spawnMd("githubuser", "repo", "output-element-id", "FILE.md");

eg: spawnMd("facebook", "react", "output", "README.md");

spawnREADME.js

Render github README.md only

Same script as above, however only works with a README.md file.

Include source script to use:

<script src="spawnREADME.js"></script>

And call the function like this:

spawnMd("githubuser", "repo", "output-element-id");

eg: spawnMd("facebook", "react", "output");

Preview available bellow: