【发布时间】:2020-05-15 03:20:56
【问题描述】:
我在_includes 中有一个 jekyll 部分,它在其内容周围包裹了一个彩色 div。部分 (callout.html) 看起来像这样:
<div markdown="1" class="callout">
{{ include.content }}
</div>
我在test.md 中这样称呼它:
{% include callout.html content="Content to be filled with a URL: {{ site.baseurl }}/img/test.png" %}
但是,这会导致 Liquid 抛出错误:
Liquid Exception: Invalid syntax for include tag: ...
" Valid syntax: {% include file.ext param='value' param2='value' %} in
bundler: failed to load command: jekyll (/usr/local/lib/ruby/gems/2.6.0/bin/jekyll)
我认为问题是由于我在content 参数中包含了{{ site.baseurl }}。
我怎样才能绕过这个限制?
【问题讨论】: