eleventy-plugin-bundle icon indicating copy to clipboard operation
eleventy-plugin-bundle copied to clipboard

Possible to have markdown inside bundle?

Open rejhgadellaa opened this issue 10 months ago • 4 comments

It seems like markdown inside a bundle isn't parsed (but rather output as-is):

markdown.md:

# Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Mauris malesuada consequat orci, et aliquet purus 
ullamcorper sed.

{% mybundle %}
> Lorem ipsum dolor sit amet.
{% endmybundle %}

Expected output of {% getBundle mybundle %}:

<blockquote>
  Lorem ipsum dolor sit amet.
</blockquote>

Actual output:

> Lorem ipsum dolor sit amet.

Am I doing something wrong, or is this just not supported?

Thanks!

rejhgadellaa avatar Feb 08 '25 06:02 rejhgadellaa

did you registered it? eleventyConfig.addBundle("mybundle", {/*..*/}) ?

Dexus avatar Feb 26 '25 13:02 Dexus

Yep, otherwise I wouldn't get any output when I getBundle? 😅

Are you saying this works for you? (I may be doing something wrong)

rejhgadellaa avatar Feb 27 '25 20:02 rejhgadellaa

Maybe you should use the filter | markdown but i'm not sure if that works on the bundle tag or on the getBundle

Dexus avatar Feb 27 '25 21:02 Dexus

Will give that a try, thanks!

rejhgadellaa avatar Mar 03 '25 11:03 rejhgadellaa