jpt580.github.io/index.html

27 lines
1.0 KiB
HTML
Raw Normal View History

2018-03-13 11:42:13 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>This page is powered by Markdown.js</title>
2018-03-13 12:00:13 +01:00
<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>
2018-03-13 11:42:13 +01:00
</head>
<body>
2018-03-13 12:09:27 +01:00
<!-- 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! -->
2018-03-13 12:09:27 +01:00
<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>
2018-03-13 11:42:13 +01:00
</body>
</html>