Open robdodson opened 3 years ago
Hi I happened across your blog post https://www.larryhudson.io/blog/2020/02/escaping-nunjucks-in-eleventy/
I wanted to mention that if you want to escape nunjucks in a code fence you can use the {% raw %} and {% endraw %} built-in nunjucks tag.
{% raw %}
{% endraw %}
Here's how we do it on developer.chrome.com https://github.com/GoogleChrome/developer.chrome.com/blame/990669af269a02c846ae0bd0d1ef84b7f31f72a7/site/en/docs/handbook/components/index.md#L17-L21
Also note that if you need to show a code fence inside of another code fence you can give the outer code fence four backticks instead of three https://github.com/GoogleChrome/developer.chrome.com/blame/990669af269a02c846ae0bd0d1ef84b7f31f72a7/site/en/docs/handbook/components/index.md#L29-L43
Thank you very much Rob! I've taken in the change and updated the instructions for anyone else that stumbles upon the post.
Hi I happened across your blog post https://www.larryhudson.io/blog/2020/02/escaping-nunjucks-in-eleventy/
I wanted to mention that if you want to escape nunjucks in a code fence you can use the
{% raw %}
and{% endraw %}
built-in nunjucks tag.Here's how we do it on developer.chrome.com https://github.com/GoogleChrome/developer.chrome.com/blame/990669af269a02c846ae0bd0d1ef84b7f31f72a7/site/en/docs/handbook/components/index.md#L17-L21
Also note that if you need to show a code fence inside of another code fence you can give the outer code fence four backticks instead of three https://github.com/GoogleChrome/developer.chrome.com/blame/990669af269a02c846ae0bd0d1ef84b7f31f72a7/site/en/docs/handbook/components/index.md#L29-L43