Jekyll - 在单个包含中包含多个参数?

Rhy*_*hys 2 jekyll

是否可以在单个包含中包含多个参数?

单身的:

{% 包含 card.html class=include.class1 %}

多种的??

{% include card.html class=include.class1 && include.class2 %}

还是我必须做 class1=include.class1 class2=include.class2?

mar*_*nuy 5

多个包含参数可以用空格分隔param1=value1 param2=value2,例如:

{% include image.html url="http://jekyllrb.com"
max-width="200px" file="logo.png" alt="Jekyll logo"
caption="This is the Jekyll logo." %} 
Run Code Online (Sandbox Code Playgroud)

然后你就可以访问它们里面包含文件与它的前缀include.,例如:

{{include.file}} {{include.caption}}
Run Code Online (Sandbox Code Playgroud)