diff --git a/src/routers/blog.js b/src/routers/blog.js index ea63e8b..c35afc8 100644 --- a/src/routers/blog.js +++ b/src/routers/blog.js @@ -5,7 +5,7 @@ const router = new Router(); const fs = require('fs'); const path = require('path'); -const marked = require('marked'); +const { marked } = require('marked'); const matter = require('gray-matter'); const postList = () => { @@ -96,7 +96,7 @@ router.get('/:slug', async (request, response, next) => { .replace(/(?<='); // Convert the content into HTML - const htmlPost = marked(content); + const htmlPost = marked.parse(content); response.render('blog/blogpost', { layout: 'blog-opengraph', diff --git a/src/routers/docs.js b/src/routers/docs.js index 5773ad1..c39205c 100644 --- a/src/routers/docs.js +++ b/src/routers/docs.js @@ -4,7 +4,7 @@ const router = new Router(); const fs = require('fs'); const path = require('path'); -const marked = require('marked'); +const { marked } = require('marked'); router.get('/', async (request, response) => { response.redirect('/docs/welcome'); @@ -56,7 +56,7 @@ router.get('/:slug', async (request, response, next) => { .replace(/(?<='); // Convert the content into HTML - content = marked(content); + content = marked.parse(content); // A boolean to show the quick links grid or not. let showQuickLinks = false;