diff options
author | Joris Guyonvarch | 2015-02-15 16:27:40 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-02-15 16:27:40 +0100 |
commit | e0aa371f230495abd53b01535cbba40e09c0b59c (patch) | |
tree | 1d897fb47beeebe2050f75ec428dffb8bfea9339 /script.js | |
parent | ca0c11b6e9f86efa9ca88833c49cd6413f438e09 (diff) |
Using markdown instead of html to write pages
Diffstat (limited to 'script.js')
-rw-r--r-- | script.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -25,9 +25,11 @@ function router() { var url = location.hash.slice(2) || 'presentation'; var contentElement = document.getElementById('content'); - fetchFile('Pages/' + url + '.html', function(contentData) { - fetchFile('Pages/contact.html', function(contactData) { - contentElement.innerHTML = contentData + contactData; + fetchFile('Pages/' + url + '.md', function(contentMd) { + fetchFile('Pages/contact.md', function(contactMd) { + var contentHtml = markdown.toHTML(contentMd); + var contactHtml = '<div class=contact>' + markdown.toHTML(contactMd) + '</div>'; + contentElement.innerHTML = contentHtml + contactHtml; }); }); } |