jpt580.github.io/index.html

27 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>This page is powered by Markdown.js</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js"></script>
</head>
<body>
<!-- This is the main container for the rendered content. -->
<div id="markdown-content">Please wait while javascript takes care of rendering the page from markdown ...</div>
<!-- That is all we need, now load the script and get going! -->
<script type="text/javascript">
// Load and render markdown from given URL
function loadMdFromUrl(url) {
$.get(url, function(data) {
var converter = new showdown.Converter();
var html = converter.makeHtml(data);
$("#markdown-content").html(html);
});
}
// Load initial page to display.
loadMdFromUrl("content/hello.md");
</script>
</body>
</html>