gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 08:41:45 25 4
gpt4 key购买 nike

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

单例:

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

多个??

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

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

最佳答案

多个include参数可以用空格分隔传递 param1=value1 param2=value2,e.g.:

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

然后您可以在内部访问它们,在包含文件中加上include.前缀,例如:

{{include.file}} {{include.caption}}

关于Jekyll - 在单个包含中包含多个参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44233881/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com