问题
I have a Jekyll website that uses Liquid Template Engine.
In this website, I have a html file called alert.html
:
<div class="alert"> {{ include.content }} </div>
And, in my markdown files when I include the above html like below it works fine:
{% include alert.html content="Some important text." %}
However, when I try to pass in some HTML, it gets rendered as plain text:
{% include alert.html content="<strong>Note:</strong> Some important text." %}
I also tried to do the same with capture
but no luck. Is there any other way to have the HTML rendered?
来源:https://stackoverflow.com/questions/60214609/how-to-insert-html-via-include-in-liquid