From e0eca4c9feb6b243d3324fe4776714c014620ca5 Mon Sep 17 00:00:00 2001 From: Oscar Date: Sun, 17 Nov 2019 22:30:20 +0100 Subject: [PATCH] feat(11ty): add custom markdown-it --- .eleventy.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.eleventy.js b/.eleventy.js index 032c181f..26dbbf4d 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -135,6 +135,17 @@ module.exports = function (config) { }) }) + const mdIt = require('markdown-it')({ + html: true + }) + const prism = require('markdown-it-prism') + const anchor = require('markdown-it-anchor') + + mdIt.use(prism) + mdIt.use(anchor) + + config.setLibrary('md', mdIt); + // You can return your Config object (optional). return { dir: {