]> git.r.bdr.sh - rbdr/blog/blobdiff - lib/blog.js
Substitute markdown for showdown
[rbdr/blog] / lib / blog.js
index 3b91943fbd87a21ce69352acce079d72f6619aea..f31234b526f7289f767bbadb04bb47134c0d9798 100644 (file)
@@ -1,11 +1,11 @@
 'use strict';
 
 const Fs = require('fs');
-const Markdown = require('markdown');
 const Mustache = require('mustache');
 const Ncp = require('ncp');
 const Path = require('path');
 const Rimraf = require('rimraf');
+const Showdown = require('showdown');
 const Util = require('util');
 
 const internals = {
@@ -126,8 +126,9 @@ module.exports = class Blog {
         const postContent = await internals.fs.readFile(postContentPath, { encoding: 'utf8' });
 
         internals.debuglog('Parsing markdown');
+        const parser = new Showdown.Converter();
         posts.push({
-          html: Markdown.markdown.toHTML(postContent),
+          html: parser.makeHtml(postContent),
           id: i + 1
         });
       }