11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
https://www.11ty.dev/
MIT License
17.18k stars 494 forks source link

Some markdown-it not working #2941

Closed BentleyDavis closed 1 year ago

BentleyDavis commented 1 year ago

Operating system

windows 11

Eleventy

2.0.1

Describe the bug

With the code below markdownItEmoji works but the other two seem to not work.

eleventyConfig.amendLibrary("md", mdLib => mdLib
        .use(wikilinks)
        .use(markdownItEmoji)
        .use(markdownItObsidianImages)
    );

Full Repo at https://github.com/BentleyDavis/eleventy-markdown-it-plugins-issue

Reproduction steps

  1. Pull Repo https://github.com/BentleyDavis/eleventy-markdown-it-plugins-issue
  2. npm install
  3. npm run eleventy
  4. Click on the link to the localhost website
  5. The page shows up . The emoji works but the other two do not

Expected behavior

wikilinks and obsidian images should work

Reproduction URL

https://github.com/BentleyDavis/eleventy-markdown-it-plugins-issue

Screenshots

image

uncenter commented 1 year ago

I don't think this issue is specific to Eleventy at least- I cloned your demo repo, tried using the .render() method on a separate markdownIt() instance with those plugins, and had no luck with those either, same result as you showed above. I want to make note that the markdown-it-obsidian-images plugin doesn't link to an existing repository of its name on NPM and the markdown-it-wikilinks repository looks like it might be no longer maintained.

BentleyDavis commented 1 year ago

I tried several other packages and the only one that works so far has been the emoji one. Even ones listed on the matkdown-it site. I'll double check that they work with markdown-it natively before reporting.

uncenter commented 1 year ago

I tried several other packages and the only one that works so far has been the emoji one. Even ones listed on the matkdown-it site. I'll double check that they work with markdown-it natively before reporting.

What other packages have you tried?