From dcd563bf8bd7c65121fa6b00c8103ce0e3314185 Mon Sep 17 00:00:00 2001 From: "dev-bot-shopify[bot]" Date: Mon, 5 Oct 2026 03:01:28 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Sync=20Liquid=20Docs=20Schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/filters.json | 43 +++++++++++++++++- data/objects.json | 112 +++++++++++++++++++++++++++++++--------------- data/tags.json | 81 +++++++++++++++++++++++---------- 3 files changed, 175 insertions(+), 61 deletions(-) diff --git a/data/filters.json b/data/filters.json index 8a6402f..c34f2e0 100644 --- a/data/filters.json +++ b/data/filters.json @@ -1332,6 +1332,25 @@ "syntax": "string | date: string", "name": "date" }, + { + "category": "metafield", + "deprecated": false, + "deprecation_reason": "", + "description": "Disclosures scoped to a country or a country subdivision are returned only for buyers in that\njurisdiction. A disclosure is returned whenever the buyer's jurisdiction cannot be determined,\nso a disclosure is never hidden on the strength of an unknown.", + "parameters": [], + "return_type": [ + { + "type": "array", + "name": "", + "description": "", + "array_value": "untyped" + } + ], + "examples": [], + "summary": "Filters a list of disclosures to the ones that apply to the buyer's jurisdiction.", + "syntax": "array | applicable_disclosures", + "name": "applicable_disclosures" + }, { "category": "font", "deprecated": false, @@ -6009,7 +6028,7 @@ "category": "html", "deprecated": false, "deprecation_reason": "", - "description": "", + "description": "You can add any other [HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attributes)\nto the tag by adding a parameter that matches the attribute name, and the desired value. Boolean attributes, such as\n`defer` and `async`, are rendered when the value is `true`, and omitted when the value is `false`.\n\n> Note:\n> The `src` attribute is managed by the filter and can't be overridden.", "parameters": [], "return_type": [ { @@ -6029,6 +6048,16 @@ "parameter": false, "display_type": "text", "show_data_tab": true + }, + { + "name": "HTML attributes", + "description": "You can specify [HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attributes) by adding a parameter that matches the attribute name, and the desired value. Boolean attributes, such as `defer` and `async`, are rendered when the value is `true`, and omitted when the value is `false`. The `src` attribute is managed by the filter and can't be overridden.\n", + "syntax": "string | script_tag: attribute: string", + "path": "/", + "raw_liquid": "{{ 'cart.js' | asset_url | script_tag: type: 'module', defer: true }}", + "parameter": true, + "display_type": "text", + "show_data_tab": true } ], "summary": "Generates an HTML `<script>` tag for a given resource URL. The tag has a `type` attribute of `text/javascript`.", @@ -6069,7 +6098,7 @@ "category": "html", "deprecated": false, "deprecation_reason": "", - "description": "", + "description": "You can add any other [HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attributes)\nto the tag by adding a parameter that matches the attribute name, and the desired value.\n\n> Note:\n> The `href` and `rel` attributes are managed by the filter and can't be overridden.", "parameters": [ { "description": "The type of media that the resource applies to.", @@ -6118,6 +6147,16 @@ "parameter": true, "display_type": "text", "show_data_tab": true + }, + { + "name": "HTML attributes", + "description": "You can specify [HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attributes) by adding a parameter that matches the attribute name, and the desired value. The `href` and `rel` attributes are managed by the filter and can't be overridden.\n", + "syntax": "string | stylesheet_tag: attribute: string", + "path": "/", + "raw_liquid": "{{ 'base.css' | asset_url | stylesheet_tag: fetchpriority: 'high' }}", + "parameter": true, + "display_type": "text", + "show_data_tab": true } ], "summary": "Generates an HTML `<link>` tag for a given resource URL. The tag has the following parameters:\n\n| Attribute | Value |\n| --- | --- |\n| `rel` | `stylesheet` |\n| `type` | `text/css` |\n| `media` | `all` |", diff --git a/data/objects.json b/data/objects.json index d10644c..f0740cc 100644 --- a/data/objects.json +++ b/data/objects.json @@ -3828,7 +3828,7 @@ "array_value": "" } ], - "summary": "The market that includes this country.", + "summary": "The market that applies to this country. In cases where multiple markets match, this returns the most-specific country region market.", "name": "market" }, { @@ -8793,7 +8793,7 @@ "array_value": "" } ], - "summary": "The currently selected market on the storefront.", + "summary": "The market that applies to the buyer's country. In cases where multiple markets match, this returns the most-specific country region market.", "name": "market" }, { @@ -9714,6 +9714,22 @@ ], "summary": "The relative URL of the metaobject.", "name": "url" + }, + { + "deprecated": false, + "deprecation_reason": "", + "description": "The name doesn't include the `metaobject.` prefix, or the file extension (`.json` or `.liquid`).\n\nIf a custom template isn't assigned to the metaobject, then `nil` is returned.", + "examples": [], + "return_type": [ + { + "type": "string", + "name": "", + "description": "", + "array_value": "" + } + ], + "summary": "The name of the [custom template](/themes/architecture/templates#alternate-templates) assigned to the metaobject.", + "name": "template_suffix" } ], "summary": "Basic information about a [`metaobject`](/api/liquid/objects#metaobject). These properties are grouped under the `system` object to avoid collisions between system property names and user-defined metaobject fields.", @@ -13745,6 +13761,22 @@ "summary": "The description of the product.", "name": "description" }, + { + "deprecated": false, + "deprecation_reason": "", + "description": "> Note:\n> This is the same value as [`product.description`](/docs/api/liquid/objects/product#product-description).\n> The description of remote products is modified to include a link to the remote store's shipping and refund policies, if the shop has defined them.", + "examples": [], + "return_type": [ + { + "type": "string", + "name": "", + "description": "", + "array_value": "" + } + ], + "summary": "The description of the product.", + "name": "content" + }, { "deprecated": false, "deprecation_reason": "", @@ -13857,22 +13889,6 @@ "summary": "The vendor of the product.", "name": "vendor" }, - { - "deprecated": false, - "deprecation_reason": "", - "description": "> Note:\n> This is the same value as [`product.description`](/docs/api/liquid/objects/product#product-description).", - "examples": [], - "return_type": [ - { - "type": "string", - "name": "", - "description": "", - "array_value": "" - } - ], - "summary": "The description of the product.", - "name": "content" - }, { "deprecated": false, "deprecation_reason": "", @@ -15301,7 +15317,7 @@ { "deprecated": false, "deprecation_reason": "", - "description": "Only filters that are relevant to the current search results are returned. If the search results contain more than 1000\nproducts, then the array will be empty.\n\n> Tip:\n> To learn about how to set up filters in the admin, visit the [Shopify Help Center](https://help.shopify.com/manual/online-store/themes/customizing-themes/storefront-filters).", + "description": "Only filters that are relevant to the current search results are returned. Filters and their value counts are\ncalculated from up to the first 1,000 search results.\n\n> Tip:\n> To learn about how to set up filters in the admin, visit the [Shopify Help Center](https://help.shopify.com/manual/online-store/themes/customizing-themes/storefront-filters).", "examples": [], "return_type": [ { @@ -15333,7 +15349,7 @@ { "deprecated": false, "deprecation_reason": "", - "description": "An item can be an [`article`](/docs/api/liquid/objects/article), a [`page`](/docs/api/liquid/objects/page), or a\n[`product`](/docs/api/liquid/objects/product).\n\n> Tip:\n> Use the [paginate](/docs/api/liquid/tags/paginate) tag to choose how many results to show per page, up to a limit of 50.", + "description": "An item can be an [`article`](/docs/api/liquid/objects/article), a [`page`](/docs/api/liquid/objects/page), or a\n[`product`](/docs/api/liquid/objects/product).\n\n> Tip:\n> Use the [paginate](/docs/api/liquid/tags/paginate) tag to choose how many results to show per page, up to a limit of 50.\n> Pagination covers up to the first 1,000 results.", "examples": [ { "name": "Search result `object_type`", @@ -15357,19 +15373,7 @@ "type": "array", "name": "", "description": "", - "array_value": "article" - }, - { - "type": "array", - "name": "", - "description": "", - "array_value": "page" - }, - { - "type": "array", - "name": "", - "description": "", - "array_value": "product" + "array_value": "article | page | product" } ], "summary": "The search result items.", @@ -15388,7 +15392,7 @@ "array_value": "" } ], - "summary": "The number of results.", + "summary": "The number of results, up to a maximum of 1,000. If a search matches more than 1,000 results, then it\nreturns 1,000.", "name": "results_count" }, { @@ -17322,6 +17326,28 @@ "summary": "Returns `true` if the locale is the store's primary locale. Returns `false` if not.", "name": "primary" }, + { + "deprecated": false, + "deprecation_reason": "", + "description": "Returns `rtl` for right-to-left locales and `ltr` for left-to-right locales.\n\nYou can use `direction` to set the [`dir` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) on the `html` element, so that the page flows correctly for right-to-left languages.", + "examples": [], + "return_type": [ + { + "type": "string", + "name": "ltr", + "description": "", + "array_value": "" + }, + { + "type": "string", + "name": "rtl", + "description": "", + "array_value": "" + } + ], + "summary": "The text direction of the locale.", + "name": "direction" + }, { "deprecated": false, "deprecation_reason": "", @@ -17484,7 +17510,7 @@ }, "deprecated": false, "deprecation_reason": "", - "description": "If a location doesn't stock a variant, then there won't be a `store_availability` for that variant and location.\n\n> Note:\n> The `store_availability` object is defined only if one or more locations has [local pickup](https://help.shopify.com/manual/shipping/setting-up-and-managing-your-shipping/local-methods/local-pickup)\n> enabled.", + "description": "If a location doesn't stock a variant, then there won't be a `store_availability` for that variant and location.\n\n> Note:\n> A returned location isn't guaranteed to offer [local pickup](https://help.shopify.com/manual/shipping/setting-up-and-managing-your-shipping/local-methods/local-pickup).\n> Check `pick_up_enabled` before presenting a location as a pickup option.", "properties": [ { "deprecated": false, @@ -17518,6 +17544,22 @@ "summary": "Returns `true` if the location has pickup enabled. Returns `false` if not.", "name": "pick_up_enabled" }, + { + "deprecated": false, + "deprecation_reason": "", + "description": "", + "examples": [], + "return_type": [ + { + "type": "boolean", + "name": "", + "description": "", + "array_value": "" + } + ], + "summary": "Returns `true` if the location is a physical retail storefront that sells in person. Returns `false` if not.", + "name": "physical_storefront" + }, { "deprecated": false, "deprecation_reason": "", diff --git a/data/tags.json b/data/tags.json index f655dc4..af2dbdd 100644 --- a/data/tags.json +++ b/data/tags.json @@ -294,29 +294,6 @@ } ] }, - { - "category": "theme", - "deprecated": false, - "deprecation_reason": "", - "description": "Outside of a loop, `{% break %}` stops the rest of the current file from rendering, which you can use as an early return. Output that was already rendered is kept.\n\n[Sections](/docs/storefronts/themes/architecture/sections), [theme blocks](/docs/storefronts/themes/architecture/blocks/theme-blocks), and snippets rendered with the [`render` tag](/docs/api/liquid/tags/render) each render in their own context, so only the file that contains the tag stops. The file that rendered it, and the rest of the page, are unaffected.\n\n> Caution:\n> A snippet rendered with the deprecated [`include` tag](/docs/api/liquid/tags/include) shares the context of the file that included it, so a `{% break %}` in that snippet also stops the rest of the including file.\n\n> Note:\n> Inside a [`for` loop](/docs/api/liquid/tags/for) or [`tablerow` loop](/docs/api/liquid/tags/tablerow), `{% break %}` stops the loop instead of the file. To learn more, refer to [`break`](/docs/api/liquid/tags/break).", - "parameters": [], - "summary": "Stops rendering the rest of the current template or snippet.", - "name": "break", - "syntax": "{% break %}", - "syntax_keywords": [], - "examples": [ - { - "name": "", - "description": "This example is a [theme block](/docs/storefronts/themes/architecture/blocks/theme-blocks) that renders breadcrumbs. Because it's rendered on the home page, the tag returns early and the block outputs nothing.", - "syntax": "", - "path": "/", - "raw_liquid": "{%- if template.name == 'index' -%}\n {%- break -%}\n{%- endif -%}\n\n", - "parameter": false, - "display_type": "text", - "show_data_tab": true - } - ] - }, { "category": "iteration", "deprecated": false, @@ -1295,5 +1272,61 @@ "show_data_tab": true } ] + }, + { + "category": "theme", + "deprecated": false, + "deprecation_reason": "", + "description": "Outside of a loop, `break` stops the rest of the current file from rendering, which you can use\nas an early return. Output that was already rendered is kept.\n\n[Sections](/docs/storefronts/themes/architecture/sections),\n[theme blocks](/docs/storefronts/themes/architecture/blocks/theme-blocks), and snippets\nrendered with the [`render` tag](/docs/api/liquid/tags/render) each render in their own\ncontext, so only the file that contains the tag stops. The file that rendered it, and the rest\nof the page, are unaffected.\n\n> Caution:\n> A snippet rendered with the deprecated [`include` tag](/docs/api/liquid/tags/include) shares\n> the context of the file that included it, so a `break` in that snippet also stops the rest of\n> the including file.\n\n> Note:\n> Inside a [`for` loop](/docs/api/liquid/tags/for) or\n> [`tablerow` loop](/docs/api/liquid/tags/tablerow), `break` stops the loop instead of the file.\n> To learn more, refer to [`break`](/docs/api/liquid/tags/break).", + "parameters": [], + "summary": "Stops the rest of a file from rendering.", + "name": "break", + "syntax": "{% break %}", + "syntax_keywords": [], + "examples": [ + { + "name": "", + "description": "This example is a [theme block](/docs/storefronts/themes/architecture/blocks/theme-blocks) that renders breadcrumbs. Because it's rendered on the home page, the tag returns early and the block outputs nothing.\n", + "syntax": "", + "path": "/", + "raw_liquid": "{%- if template.name == 'index' -%}\n {%- break -%}\n{%- endif -%}\n\n<nav aria-label=\"Breadcrumbs\">\n <a href=\"{{ routes.root_url }}\">Home</a>\n <span aria-hidden=\"true\">/</span>\n <span>{{ page_title }}</span>\n</nav>", + "parameter": false, + "display_type": "text", + "show_data_tab": true + } + ] + }, + { + "category": "theme", + "deprecated": false, + "deprecation_reason": "", + "description": "A block is a reusable piece of a page, with markup, behavior, accessibility attributes, and theme editor settings kept together in one Liquid file. A Liquid template can render these [theme blocks](/docs/storefronts/themes/architecture/blocks) directly with `{% block %}`, in addition to blocks that merchants add through the theme editor.\n\nUse `{% block %}` the same way that [`{% render %}`](/docs/api/liquid/tags/render) renders a snippet: name the block file, pass any named parameters it accepts, and optionally provide body content. Because the template names each block, you can read a page's structure as a tree of blocks in the template itself. Page-specific content stays in the template that calls the block.\n\n## Basic syntax\n\nThe block name maps to a file in `blocks/`. For example, `{% block 'container' %}` renders `blocks/container.liquid`.\n\nA template composes its page by calling blocks. The following template puts a heading inside a `container` block:\n\n```liquid\n{% block 'container' %}\n <h1>Welcome</h1>\n{% endblock %}\n```\n\nEverything between the opening and closing tags is the block's body content. The block file is written in Liquid, and it prints that body content with `{{ content }}`:\n\n```liquid\n{% doc %}\n @param {string} [tag] - The HTML element to render.\n @param {string} [class] - A CSS class to add to the element.\n @param {string} [content] - The optional body content.\n{% enddoc %}\n\n{% assign tag = tag | default: 'div' %}\n\n<{{ tag }} class=\"{{ class }}\">\n {{ content }}\n</{{ tag }}>\n\n{% schema %}\n{\n \"name\": \"t:blocks.container\",\n \"settings\": []\n}\n{% endschema %}\n```\n\nUse [`{% doc %}`](/docs/storefronts/themes/tools/liquid-doc) to document the named parameters the block accepts and to show how to call it. `{% doc %}` is documentation only: it doesn't declare, validate, or bind parameters. A parameter that's declared only in `{% doc %}` doesn't touch `block.settings`, so the block reads it only as the plain variable, like `foo`, never as `block.settings.foo`.\n\nAlways document `content` in `{% doc %}` and indicate whether it's required or optional. Use `@param {string} content` for required body content and `@param {string} [content]` for optional body content.\n\nUse [`{% schema %}`](/docs/storefronts/themes/architecture/blocks/theme-blocks/schema) for settings in the theme editor, such as appearance choices, resource pickers, and contextual component settings.\n\n## Passing parameters\n\nPass named parameters after the block name, like you do with `{% render %}`. Each parameter is available as a variable inside the block, and the block's Liquid code decides what it does.\n\n```liquid\n{% block 'container', tag: 'header', class: 'site-header' %}\n <h1>Page title</h1>\n{% endblock %}\n```\n\nThis call passes a `tag` and a `class`, which the block can use to choose its HTML element and add CSS classes. `class` has no special platform behavior, so your styling stays visible in the Liquid that renders the HTML.\n\n### Schema settings\n\nA block's `{% schema %}` defines its [theme editor settings](/docs/storefronts/themes/architecture/settings/input-settings), which the block reads as `block.settings.<id>`. A merchant usually sets these values in the theme editor. When a parameter has the same name as a setting that the schema declares, the parameter also sets that setting, which is useful when the template already knows the value. A parameter with no matching setting is only a variable.\n\nFor example, if the `button` schema declares a `variant` setting, this call makes `button-primary` available inside the block as both `variant` and `block.settings.variant`:\n\n```liquid\n{% block 'button', variant: 'button-primary' %}\n Add to cart\n{% endblock %}\n```\n\nInside `blocks/button.liquid`, both reads return `button-primary`:\n\n```liquid\n{{ variant }}\n{{ block.settings.variant }}\n```\n\nOne call can mix parameters that map to settings with parameters that don't:\n\n```liquid\n{% block 'product-card',\n class: 'featured-product',\n product: product\n%}\n{% endblock %}\n```\n\nFor how a block declares and reads settings, see [block schema](/docs/storefronts/themes/architecture/blocks/theme-blocks/schema).\n\n### Arrays\n\nA block parameter can take a literal array for a short list that lives in the template.\n\nFor a direct parameter, list the values inline:\n\n```liquid\n{% block 'badge-list',\n badges: ['New arrival', 'Low stock', 'Online only']\n%}\n{% endblock %}\n```\n\nThe same works for a parameter that maps to a schema setting:\n\n```liquid\n{% block 'collection-list',\n collections: [collections['summer'], collections['sale']]\n%}\n{% endblock %}\n```\n\n> Note:\n> Inline literal arrays are specific to the `{% block %}` tag. Other tags, such as `{% render %}` and `{% partial %}`, don't accept an array written directly in the tag.\n\n### Body content\n\nThe content between `{% block 'name' %}` and `{% endblock %}` is the block's body content, and the block prints it with `{{ content }}`.\n\nBody content can be plain markup, other blocks, or both. For example, a product template passes a heading and a nested `button` block into a `container`:\n\n```liquid\n{% block 'container' %}\n <h1>{{ product.title }}</h1>\n {% block 'button', type: 'submit', class: 'button--full-width' %}\n Add to cart\n {% endblock %}\n{% endblock %}\n```\n\nWhen a block only displays text or markup, pass it as body content instead of adding parameters like `title`, `body`, or `heading`. Add a parameter only when the block needs to do something with the value, like change how it renders or read the data you pass.\n\n## Where you can use the tag\n\nUse `{% block %}` in `layout/` and `templates/` files.", + "parameters": [], + "summary": "Renders a reusable theme block directly from a Liquid template.", + "name": "block", + "syntax": "{% block 'name', parameter: value %}\n content\n{% endblock %}", + "syntax_keywords": [], + "examples": [] + }, + { + "category": "theme", + "deprecated": false, + "deprecation_reason": "", + "description": "A partial is a named region of server-rendered HTML that JavaScript can refresh without a full page reload. Mark the region inline in a template or layout with `{% partial %}`.\n\nFor the full partial-rendering JavaScript API, including fetching, applying, and refreshing partials, refer to [Partials](/docs/storefronts/themes/architecture/partials).\n\n## Basic syntax\n\nA partial wraps a region of a template or layout in `{% partial %}` and `{% endpartial %}`. The content inside is regular Liquid that renders with the rest of the page on the first load:\n\n```liquid\n{% partial 'product-grid' %}\n {% for product in collection.products %}\n {% render 'product-card', product: product %}\n {% endfor %}\n{% endpartial %}\n```\n\nThe partial name is how JavaScript targets the region later. For example, refresh `product-grid` after an interaction changes the current page:\n\n```js\nimport {partials} from '@shopify/partial-rendering';\n\nawait partials.refresh('product-grid', 'product-count');\n```", + "parameters": [], + "summary": "Marks a named, server-rendered region that JavaScript can refresh without a full page reload.", + "name": "partial", + "syntax": "{% partial 'name' %}\n content\n{% endpartial %}", + "syntax_keywords": [ + { + "keyword": "name", + "description": "The name that JavaScript uses to target this partial." + }, + { + "keyword": "content", + "description": "The server-rendered content for the partial." + } + ], + "examples": [] } -] \ No newline at end of file +]