Hi everyone,
I was reading the debut theme to understand something about the header part. I found that the following variables are defined at the bottom of it:
{% assign potential_action_target = shop.url | append: routes.search_url | append: "?q={search_term_string}" %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": {{ shop.name | json }},
"potentialAction": {
"@type": "SearchAction",
"target": {{ potential_action_target | json }},
"query-input": "required name=search_term_string"
},
"url": {{ shop.url | append: page.url | json }}
}
Although I understand what this piece of code does. I am having a hard time understanding the intent of it. Can someone please explain why they did this?
Thank you so much for your time
User | Count |
---|---|
16 | |
12 | |
7 | |
6 | |
5 |