Skip to content

Instantly share code, notes, and snippets.

@haslinger
Last active November 13, 2023 14:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haslinger/435dc92e1b2efe74c2df9afc778e29d2 to your computer and use it in GitHub Desktop.
Save haslinger/435dc92e1b2efe74c2df9afc778e29d2 to your computer and use it in GitHub Desktop.
Super simple markdown to nice webpage with Showdown and Sakura
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css">
<script type='text/javascript'src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js"></script>
<div id="content">
# My first Webpage
Not too hard, isn't it?
</div>
<script>
element = document.getElementById("content");
element.outerHTML = new showdown.Converter().makeHtml(element.innerHTML);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment