In this example, we create a little JSON feed with the following snippet:
---
permalink: '/my-cool-feed.json'
---
{
"posts": [
{% for item in collections.posts %}
{
"title": "{{ item.data.title }}",
"url": "{{ item.url }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
]
}
Head over to the full quick tip to learn more.