-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
29 lines (26 loc) · 885 Bytes
/
index.html
File metadata and controls
29 lines (26 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<head><title>My Home Page</title></head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<body onload="getText('README.md')">
<script>
// get markdown content
var body_location = 'README.md';
function getText(myUrl){
var result = null;
$.ajax( { url: myUrl,
type: 'get',
dataType: 'html',
async: false,
success: function(data) { result = data; }
}
);
FileReady = true;
return result;
}
var markdown_source = getText(body_location);
// convert markdown to html
var output = markdown.toHTML( markdown_source );
document.write(output);
</script>
</body>
</html>