Closed thewronghand closed 10 months ago
Odd. I use code blocks regularly and never run into an issue.
Is this still an issue? Have you updated to the latest version of the template?
Can you share the code block causing this issue?
This was fixed in a recent version of the template. The problem was that text inside curly brackets, {{...}}, would be interpreted as a nunjuck variable. (Nunjuck is the templating language we are using). It would then thriw an error if it couldn't find the variable.
This should no longer be the case. Try updating the template and see if that fixes it
Hello,
I'm facing an issue with Eleventy when building markdown files containing code blocks. Below is a detailed breakdown:
Problem:
When there's a code block (wrapped with ```) in an md file, a build error occurs. Here's a snippet of the error message I encountered:
The content in the problematic line 21 is:
It seems that the part initial={{ opacity: 0 }} from line 21 is causing the issue.
I suspect that the content within the code block is being interpreted by Nunjucks, which is leading to the problem. When I wrapped the content with the raw tags, the build was successful.
However, manually adding raw tags for every code block in my Obsidian markdown files would be inefficient. So, I attempted to modify the .eleventy.js configuration to automatically wrap code blocks in markdown files with raw tags. However, being unfamiliar with Eleventy, I'm uncertain if I've written the code incorrectly or if my approach to the issue itself is flawed. I'm still encountering the same error on line 21.
I would appreciate any insights or solutions to resolve this issue. Thank you for your assistance.