Title: The intruder
Content: Got inside the house
Author: Bastien Vacherand
Render tag with the for parameter, using frontmatter for an array of objects.
output
Content: Got inside the house
Author: Bastien Vacherand
Content: With a lot of pressure
Author: Barbara Streisand
Content: That's when the fun begins
Author: Mickael Jackson
input
{% render 'components/card' for items as item %}
components/card.liquid
<article>
<h4>Title: {{ item.title }}</h4>
<p>Content: {{ item.content}}</p>
<p>Author: {{ item.author }}</p>
</article>
Frontmatter
items:
- title: The intruder
content: Got inside the house
author: Bastien Vacherand
- title: Balls get inside
content: With a lot of pressure
author: Barbara Streisand
- title: When the sun goes down
content: That's when the fun begins
author: Mickael Jackson