html Jekyll Casts - 液体:循环

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Jekyll Casts - 液体:循环相关的知识,希望对你有一定的参考价值。

<!-- 
In this last example we’ll go over looping in liquid. We’ll create a cupcakes array in front matter then loop over it in liquid and output it in an unordered list. The syntax for a for loop in liquid is for variable in array, variable can named whatever you’d like and holds the item in the current iteration of the loop. 
-->

---
heading: I like cupcakes
show_heading: false
cupcakes:
  - chocolate
  - lemon
  - strawberry
---

<ul>
  {% for cupcake in page.cupcakes %}
    <li>{{ cupcake }}</li>
  {% endfor %}
</ul>

以上是关于html Jekyll Casts - 液体:循环的主要内容,如果未能解决你的问题,请参考以下文章

html Jekyll Casts - 液体:字符串过滤器

html Jekyll Casts - 照片库

html Jekyll Casts - 永久链接

html Jekyll Casts - Liquid:逻辑声明

html Jekyll Casts - JSON输出

html Jekyll Casts - 日期格式