2

I have an Eleventy site where I've redefined the markdown library in order to enable footnotes.

let markdownIt = require("markdown-it");
let markdownItFootnote = require("markdown-it-footnote");
let options = {
  html: true,
  breaks: true,
  linkify: false
};

let markdownLib = markdownIt(options).use(markdownItFootnote);
config.setLibrary("md", markdownLib);

I'm also trying to implement responsive images via the eleventy-img plugin, however it seems by redefining Markdown-It I've lost LiquidJS preprocessing and can't use Liquid-based shortcodes in markdown content (and therefore can't use the async keyword required to get useful responsive images via the plugin's examples). Is there some way to configure Eleventy to get both?

1
  • I'm not able to reproduce this; I've been using markdown-it plugins and shortcodes in markdown with no issue. Do you have a minimal repro? Commented May 28, 2021 at 23:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.