Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save infernalsirius/eedfe1056c76a0b99cc051b5e6f6e7ed to your computer and use it in GitHub Desktop.
Save infernalsirius/eedfe1056c76a0b99cc051b5e6f6e7ed to your computer and use it in GitHub Desktop.
{% layout none %}
{% capture results %}
{% for item in search.results %}
{% assign product = item %}
{
"title" : {{ product.title | json }},
"url" : {{ product.url | within: product.collections.last | json }},
"thumbnail": {{ product.featured_image.src | product_img_url: 'thumb' | json }}
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
{% endcapture %}
{
"results_count": {{ search.results_count }},
"results": [{{ results }}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment