Global JSON variables

Globals don’t need to be passed down, they are accessible from all files. one or more objects can be passed to a template.

output

Title: When the sun goes down

Content: That's when the fun begins

Author: Mickael Jackson

input

{% render 'components/card', item: single-object %}

card.liquid

<article>
    <h4>{{ item.title }}</h4>
    <p>{{ item.content}}</p>
    <p>{{ item.author }}</p>
</article>

single-object.json

{
    "title": "When the sun goes down",
    "content": "That's when the fun begins",
    "author": "Mickael Jackson"
}