From 81fc36e7d9dbbb6417a70beea095d7bb70283f97 Mon Sep 17 00:00:00 2001 From: Sebin Nyshkim Date: Thu, 17 Oct 2024 18:03:51 +0200 Subject: [PATCH] feat: :sparkles: enable some extra features of markdown-it --- eleventy.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eleventy.config.js b/eleventy.config.js index fbfce2f..9a44e0d 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -11,6 +11,7 @@ import eleventyPluginOgImage from 'eleventy-plugin-og-image'; import eleventyPluginReadingTime from '@myxotod/eleventy-plugin-readingtime'; import eleventyPluginRobotsTxt from 'eleventy-plugin-robotstxt'; import eleventyPluginSyntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight'; +import markdownIt from 'markdown-it'; import markdownItAbbr from 'markdown-it-abbr'; import markdownItAnchor from 'markdown-it-anchor'; import markdownItCallouts from 'markdown-it-obsidian-callouts'; @@ -87,6 +88,8 @@ export default async function (eleventyConfig) { } }); + eleventyConfig.setLibrary('md', markdownIt({ html: true, linkify: true, typographer: true })); + eleventyConfig.amendLibrary('md', (mdLib) => mdLib .use(markdownItAbbr)