feat: enable some extra features of markdown-it

This commit is contained in:
Sebin Nyshkim 2024-10-17 18:03:51 +02:00
parent 8a2642df7f
commit 81fc36e7d9

View file

@ -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)