Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Sync Liquid Docs Schema #926

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 78 additions & 4 deletions data/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,28 @@
"array_value": ""
}
],
"examples": [],
"examples": [
{
"name": "",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign product = collection.products | find: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ product.title }}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
},
{
"name": "Returns `nil` when no items match the specified property value.",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign product = collection.products | find: 'vendor', \"Polina's Potions\" %}\n\n{{ product.title | default: \"No product found\" }}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"summary": "Returns the first item in an array with a specific property value.",
"syntax": "array | find: string, string",
"name": "find"
Expand All @@ -2269,7 +2290,28 @@
"array_value": ""
}
],
"examples": [],
"examples": [
{
"name": "",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign index = collection.products | find_index: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ index }}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
},
{
"name": "Returns `nil` when no items match the specified property value.",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign index = collection.products | find_index: 'vendor', \"Polina's Potions\" %}\n\n{{ index | default: \"No index found\" }}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"summary": "Returns the index of the first item in an array with a specific property value.",
"syntax": "array | find_index: string, string",
"name": "find_index"
Expand Down Expand Up @@ -2358,7 +2400,28 @@
"array_value": ""
}
],
"examples": [],
"examples": [
{
"name": "",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign has_potent_potions = collection.products | has: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ has_potent_potions }}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
},
{
"name": "Returns `false` when no items match the specified property value.",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign has_potent_potions = collection.products | has: 'vendor', \"Polina's Potions\" %}\n\n{{ has_potent_potions }}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"summary": "Tests if any item in an array has a specific property value.",
"syntax": "array | has: string, string",
"name": "has"
Expand Down Expand Up @@ -2667,7 +2730,18 @@
"array_value": "untyped"
}
],
"examples": [],
"examples": [
{
"name": "",
"description": "",
"syntax": "",
"path": "/collections/all",
"raw_liquid": "{% assign polina_products = collection.products | reject: 'vendor', \"Polina's Potent Potions\" %}\n\nProducts from other vendors than Polina's Potent Potions:\n\n{% for product in polina_products -%}\n - {{ product.title }}\n{%- endfor %}",
"parameter": false,
"display_type": "text",
"show_data_tab": true
}
],
"summary": "Filters an array to exclude items with a specific property value.",
"syntax": "array | reject: string, string",
"name": "reject"
Expand Down
2 changes: 1 addition & 1 deletion data/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -8989,7 +8989,7 @@
"examples": [
{
"name": "Access metafields",
"description": "The access path for metafields consists of two layers:\n\n- namespace - A grouping of metafields to prevent conflicts.\n- key - The metafield name.\n\nGiven this, you can access the metafield object with the following syntax:\n\n```liquid\n{{ resource.metafields.namespace.key }}\n```\n\n> Note:\n> The namespace and key values will always be `snake_case`, regardless of the casing used in the metafield definition.\n",
"description": "The access path for metafields consists of two layers:\n\n- namespace - A grouping of metafields to prevent conflicts.\n- key - The metafield name.\n\nGiven this, you can access the metafield object with the following syntax:\n\n```liquid\n{{ resource.metafields.namespace.key }}\n```\n",
"syntax": "",
"path": "/products/health-potion",
"raw_liquid": "Type: {{ product.metafields.information.directions.type }}\nValue: {{ product.metafields.information.directions.value }}",
Expand Down