New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{{ }} blocks in posts are parsed as if they are part of a template #477
Comments
I believe sculpin posts, at least markdown ones, go through two layers of processing: twig, and then markdown to html. IIRC frontmatter is used to set the twig template to include from, and sculpin populates the As an example, in my posts where I summarize conferences, I use a Twig macro to ensure each talk summary has the same appearance. |
Cool, that makes sense, but should that also affect code inside code blocks using ``` blocks? |
I would prefer that it didn't, but I suspect that at the evaluation point in the code, the parser would have no idea what code blocks mean. Maybe if the code block were encased in a verbatim tag?
|
I never got to where I was happy with this chicken or the egg problem. I came to the conclusion the best solution would involve writing a proper Twig/Markdown lexer/parser or something along those lines because whether you process one vs the other first hashadmajor impact on everything and it seemed like there was no good/sure way to handle it. :-/ I know for my own posts some combination of |
While working on a GitHub Actions related post got a report that only the
$
in${{ matrix.os }}
was visible. Hot fixed it using{{ "${{" }} matrix.os }}
. But not sure if the post themself should be run through Twig as a templateThe text was updated successfully, but these errors were encountered: