From 5bccb9f60eb2115059b2b0a64ba29237021ca45b Mon Sep 17 00:00:00 2001 From: Sebin Nyshkim Date: Fri, 4 Jul 2025 17:22:15 +0200 Subject: [PATCH] build: :wrench: tweak markdown transformation --- eleventy.config.js | 4 ++++ 1 file changed, 4 insertions(+) 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 = {