-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Shortcode does not render HTML #460
Comments
It looks like you might be escaping the backticks in your return statement? Might that be the cause? |
This is a good question! Handlebars escapes shortcodes by default so you want the triple-stash for unescaped output |
I will update the documention for shortcodes to make this clearer. |
Both https://www.11ty.io/docs/languages/handlebars/ and https://www.11ty.io/docs/shortcodes/ have been updated with this information. Thanks for filing this! Very helpful! |
In my eleventy config I have this shortcode:
In my handlebars file I have this
{{ testCode 'Mathias' }}
But the shortcode is being rendered as a string. So in the browser it looks like this
<div class="some-class">Mathias</div>
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: