diff --git a/eleventy.config.js b/eleventy.config.js index 244167c..a77fe1b 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -3,7 +3,9 @@ import eleventyPluginNavigation from '@11ty/eleventy-navigation'; import eleventyPluginWebc from '@11ty/eleventy-plugin-webc'; import Image, { eleventyImagePlugin } from '@11ty/eleventy-img'; import htmlminifier from 'html-minifier-terser'; +import markdownIt from 'markdown-it'; +const MARKDOWNIT_OPTIONS = { html: true, linkify: true, typographer: true }; const IMAGE_TRANSFORM_OPTS = { // Set global default options formats: ['avif', 'webp', 'auto'], @@ -76,6 +78,8 @@ export default async function (eleventyConfig) { }); eleventyConfig.addPlugin(eleventyPluginNavigation); eleventyConfig.addPlugin(eleventyImagePlugin, IMAGE_TRANSFORM_OPTS); + + eleventyConfig.setLibrary('md', markdownIt(MARKDOWNIT_OPTIONS)); } export const config = {