diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..2f7efbe --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/index.html b/index.html index 7e4638d..ceefd5b 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ padding: 0 15px; } - +
diff --git a/main.js b/main.js index 13e9a1b..b691499 100644 --- a/main.js +++ b/main.js @@ -20,6 +20,10 @@ } location.search = query; // page will be refreshed } + + document.showdown = require('showdown'); + document.converter = new showdown.Converter(); + document.getElementById('submit').onclick = submit; document.onkeypress = function (e) { @@ -47,7 +51,10 @@ .then(function (res) { return res.json().then(function (body) { if (res.status === 200) { - return body; + + + html = converter.makeHtml(body); + return html; } console.log(res, body); // debug throw new Error('Gist ' + gistId + ', ' + body.message.replace(/\(.*\)/, ''));