X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/eccb3cc40e104fffaa89ef62b686659458021298..957336624b685f92b3882a1f42ae7f2acbc22bb0:/lib/blog.js diff --git a/lib/blog.js b/lib/blog.js index 3b91943..f31234b 100644 --- a/lib/blog.js +++ b/lib/blog.js @@ -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 }); }