Closed olets closed 2 years ago
Correct, by default Eleventy will try and prerender the Markdown templates w/ LiquidJS. We recently discussed it in https://github.com/11ty/eleventy/discussions/2148, which includes a couple potential solutions based on your requirements.
Thanks for the link!
For anyone else who hits this, keep in mind that this repo's default is Nunjucks not Liquid. Both have {% raw %)…{% endraw %}
so no effective difference in the solution.
It is not possible to use
{{
,{#
, or{%
in code blocks or inline code in markdown files without Eleventy trying to parse it. For example you can't say in./posts/my-post.md
or
(My use case: shell script examples and Twig examples in blog posts.)
Disabling pre-processing of Markdown files enables
{#
Not a great solution if it worked, but it doesn't. Now
will be treated literally, and compile as
<code>{#</code>
but
and
will try to compile as Liquid.
The fundamental limitation here may be something about markdown-it, or something about Eleventy's data flow. I ran into it in this demo, lmk if I should move the issue to a different repo.