Created
December 15, 2017 09:50
-
-
Save awojtczyk/4c7d8f4a9f75d5a9342ef7af0c4cf7c6 to your computer and use it in GitHub Desktop.
search.json.liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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