How to insert HTML via include in Liquid?

浪子不回头ぞ 提交于 2020-03-05 00:33:22

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!