@shopify/cli 3.70.0 → 3.71.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/{chunk-DVTWERMH.js → chunk-24P2IYB3.js} +5 -5
  2. package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
  3. package/dist/{chunk-5OP2SA7G.js → chunk-2S2TOSUR.js} +214 -56
  4. package/dist/{chunk-I3IIDOBX.js → chunk-2ULUZCOJ.js} +3 -3
  5. package/dist/{chunk-PNN7RS7Y.js → chunk-3NSN5Z4N.js} +100 -11
  6. package/dist/{chunk-AT4IG4GJ.js → chunk-4BWP64T3.js} +9 -11
  7. package/dist/{chunk-SYRHCENA.js → chunk-4FXGYSQK.js} +2 -2
  8. package/dist/{chunk-PKE54TAY.js → chunk-5EH323MO.js} +7 -7
  9. package/dist/{chunk-JLK5OMFF.js → chunk-5RITYBXF.js} +2 -2
  10. package/dist/{chunk-47OJGAFT.js → chunk-6XIQQAII.js} +3 -3
  11. package/dist/{chunk-VFQMUAHB.js → chunk-DGICBICS.js} +4 -4
  12. package/dist/{chunk-335KXO4I.js → chunk-DN4PETPW.js} +7 -7
  13. package/dist/{chunk-MRDDDATQ.js → chunk-EIYEVKVE.js} +3 -3
  14. package/dist/{chunk-N2DEYZD6.js → chunk-EKRPU77H.js} +3 -3
  15. package/dist/{chunk-ZGHNMRBX.js → chunk-HSTSRNLJ.js} +121 -66
  16. package/dist/{chunk-MMQOVZDR.js → chunk-JJUWGFVJ.js} +5 -5
  17. package/dist/{chunk-MX4RJDBM.js → chunk-KYB6A4PE.js} +1 -2
  18. package/dist/{chunk-X6F3DHKX.js → chunk-L2JRQYNX.js} +2 -2
  19. package/dist/{chunk-GDYKHT64.js → chunk-L5QY66M5.js} +2805 -33
  20. package/dist/{chunk-XSMWYZDC.js → chunk-LFQTQLLB.js} +10 -10
  21. package/dist/{chunk-NH4U4X67.js → chunk-LVCMJDAE.js} +4 -4
  22. package/dist/{chunk-5QQTRGJ7.js → chunk-MU52LLEY.js} +4 -4
  23. package/dist/{chunk-43YGIE7Y.js → chunk-NGHX3OJ3.js} +2 -2
  24. package/dist/{chunk-NYFXBTWK.js → chunk-NZRMJMX6.js} +4 -4
  25. package/dist/{chunk-TCTXUAZT.js → chunk-O53RG2PS.js} +3 -3
  26. package/dist/{chunk-CBD6UXLA.js → chunk-OJOHMVV7.js} +5 -5
  27. package/dist/chunk-OSIMKPXN.js +104 -0
  28. package/dist/{chunk-N4X7XQWN.js → chunk-PGVLZNNX.js} +7 -3
  29. package/dist/{chunk-VHAXHYTL.js → chunk-PPETSPYI.js} +3 -3
  30. package/dist/{chunk-UOZCMFCN.js → chunk-RJ26EKJZ.js} +18 -13
  31. package/dist/{chunk-WN3FKMKB.js → chunk-RWUKHJPN.js} +14 -19
  32. package/dist/{chunk-ND6AGPC6.js → chunk-RYLVSBYA.js} +3 -3
  33. package/dist/{chunk-MH5JSAVK.js → chunk-SBXDGZUV.js} +3 -3
  34. package/dist/{chunk-BMNDAI5O.js → chunk-SQN45NED.js} +4 -4
  35. package/dist/{chunk-WI6MEN7U.js → chunk-TFYGB36T.js} +2 -2
  36. package/dist/{chunk-PJKCWDDX.js → chunk-TM56R4RM.js} +548 -550
  37. package/dist/{chunk-KYBCPKPL.js → chunk-V2IQ2QWA.js} +3 -3
  38. package/dist/{chunk-NEOIQ6PN.js → chunk-WNDN5FAY.js} +2 -2
  39. package/dist/{chunk-FDJVVEGH.js → chunk-WQY4NQRT.js} +4 -6
  40. package/dist/{chunk-LN444KRM.js → chunk-ZINX4YDI.js} +2 -2
  41. package/dist/{chunk-MQXHFQM3.js → chunk-ZPWQCUYD.js} +4 -4
  42. package/dist/cli/commands/auth/logout.js +18 -20
  43. package/dist/cli/commands/auth/logout.test.js +24 -26
  44. package/dist/cli/commands/cache/clear.js +17 -19
  45. package/dist/cli/commands/debug/command-flags.js +17 -19
  46. package/dist/cli/commands/docs/generate.js +17 -19
  47. package/dist/cli/commands/docs/generate.test.js +18 -20
  48. package/dist/cli/commands/help.js +17 -19
  49. package/dist/cli/commands/kitchen-sink/async.js +18 -20
  50. package/dist/cli/commands/kitchen-sink/async.test.js +19 -21
  51. package/dist/cli/commands/kitchen-sink/index.js +20 -22
  52. package/dist/cli/commands/kitchen-sink/index.test.js +23 -25
  53. package/dist/cli/commands/kitchen-sink/prompts.js +18 -20
  54. package/dist/cli/commands/kitchen-sink/prompts.test.js +19 -21
  55. package/dist/cli/commands/kitchen-sink/static.js +18 -20
  56. package/dist/cli/commands/kitchen-sink/static.test.js +19 -21
  57. package/dist/cli/commands/notifications/generate.js +18 -20
  58. package/dist/cli/commands/notifications/list.js +18 -20
  59. package/dist/cli/commands/search.js +18 -20
  60. package/dist/cli/commands/upgrade.js +18 -20
  61. package/dist/cli/commands/upgrade.test.js +1 -2
  62. package/dist/cli/commands/version.js +18 -20
  63. package/dist/cli/commands/version.test.js +19 -21
  64. package/dist/cli/services/commands/notifications.js +12 -14
  65. package/dist/cli/services/commands/search.js +8 -9
  66. package/dist/cli/services/commands/search.test.js +9 -10
  67. package/dist/cli/services/commands/version.js +9 -10
  68. package/dist/cli/services/commands/version.test.js +11 -12
  69. package/dist/cli/services/kitchen-sink/async.js +8 -9
  70. package/dist/cli/services/kitchen-sink/prompts.js +8 -9
  71. package/dist/cli/services/kitchen-sink/static.js +8 -9
  72. package/dist/cli/services/upgrade.js +9 -10
  73. package/dist/cli/services/upgrade.test.js +12 -13
  74. package/dist/configs/all.yml +15 -0
  75. package/dist/configs/recommended.yml +9 -0
  76. package/dist/{custom-oclif-loader-IZLFCRGJ.js → custom-oclif-loader-4ILBNUIN.js} +8 -9
  77. package/dist/data/filters.json +98 -3
  78. package/dist/data/latest.json +1 -1
  79. package/dist/data/manifest_theme.json +1 -0
  80. package/dist/data/objects.json +39 -1619
  81. package/dist/data/preset_blocks.json +78 -0
  82. package/dist/data/section.json +1 -42
  83. package/dist/data/shopify_system_translations.json +34 -7
  84. package/dist/data/tags.json +10 -0
  85. package/dist/data/theme_block.json +1 -19
  86. package/dist/{del-FEQWOMIX.js → del-K5ZJEWTD.js} +3 -3
  87. package/dist/{error-handler-DAI5HMQW.js → error-handler-VW3Z4CSO.js} +15 -17
  88. package/dist/hooks/postrun.js +13 -15
  89. package/dist/hooks/prerun.js +15 -19
  90. package/dist/index.js +19504 -17453
  91. package/dist/lib-PPXZBVZX.js +6 -0
  92. package/dist/{lib-JJXX7GH6.js → lib-XYCLX35G.js} +5 -5
  93. package/dist/{local-QD6GDUUE.js → local-42CRL4YR.js} +10 -9
  94. package/dist/{morph-FN23MJ2S.js → morph-SEECJQ2W.js} +2 -2
  95. package/dist/{node-4XKDIIJ7.js → node-RJUK5KNM.js} +19 -21
  96. package/dist/{node-package-manager-IEZ6F5VN.js → node-package-manager-6PHP23VI.js} +9 -10
  97. package/dist/{out-ZDSLKX4N.js → out-MHEKZJWS.js} +2 -2
  98. package/dist/{path-T2RCZTRE.js → path-5SZGULBR.js} +2 -3
  99. package/dist/tsconfig.tsbuildinfo +1 -1
  100. package/dist/{ui-BUB4OWO7.js → ui-OIACULNZ.js} +8 -9
  101. package/dist/{workerd-DIIGDIHZ.js → workerd-MTYSNN63.js} +19 -21
  102. package/oclif.manifest.json +334 -131
  103. package/package.json +7 -8
  104. package/assets/demo-catalog.json +0 -655
  105. package/dist/assets/demo-catalog.json +0 -655
  106. package/dist/chunk-2PUMVRDO.js +0 -131
  107. package/dist/chunk-7GNQ7YY4.js +0 -116
  108. package/dist/chunk-E2SYFYJU.js +0 -58
  109. package/dist/chunk-NLUGD7PZ.js +0 -2731
  110. package/dist/chunk-P6ABWRKD.js +0 -59
  111. package/dist/chunk-QSUS3GJF.js +0 -3838
  112. package/dist/chunk-RUK73IAH.js +0 -312
  113. package/dist/chunk-T2GATXSP.js +0 -112
  114. package/dist/chunk-VT3VJHZ7.js +0 -45
  115. package/dist/chunk-XEDHKQZA.js +0 -116
  116. package/dist/cli/commands/demo/catalog.d.ts +0 -6
  117. package/dist/cli/commands/demo/catalog.js +0 -36
  118. package/dist/cli/commands/demo/generate-file.d.ts +0 -11
  119. package/dist/cli/commands/demo/generate-file.js +0 -37
  120. package/dist/cli/commands/demo/index.d.ts +0 -10
  121. package/dist/cli/commands/demo/index.js +0 -36
  122. package/dist/cli/commands/demo/print-ai-prompt.d.ts +0 -6
  123. package/dist/cli/commands/demo/print-ai-prompt.js +0 -37
  124. package/dist/cli/services/demo.d.ts +0 -26440
  125. package/dist/cli/services/demo.js +0 -25
  126. package/dist/cli/services/demo.test.js +0 -42
  127. package/dist/constants-QFFDI47A.js +0 -26
  128. package/dist/system-KSIGUX64.js +0 -29
@@ -1349,1604 +1349,6 @@
1349
1349
  ],
1350
1350
  "summary": "The user associated with the author of the article.",
1351
1351
  "name": "user"
1352
- },
1353
- {
1354
- "deprecated": false,
1355
- "deprecation_reason": "",
1356
- "description": "The size of a string is the number of characters that the string includes. The size of an array is the number of items\nin the array.",
1357
- "examples": [
1358
- {
1359
- "name": "",
1360
- "description": "",
1361
- "syntax": "",
1362
- "path": "/collections/sale-potions",
1363
- "raw_liquid": "{{ collection.title | size }}\n{{ collection.products | size }}",
1364
- "parameter": false,
1365
- "display_type": "text",
1366
- "show_data_tab": false
1367
- },
1368
- {
1369
- "name": "Dot notation",
1370
- "description": "You can use the `size` filter with dot notation when you need to use it inside a tag or object output.\n",
1371
- "syntax": "",
1372
- "path": "/collections/sale-potions",
1373
- "raw_liquid": "{% if collection.products.size >= 10 %}\n There are 10 or more products in this collection.\n{% else %}\n There are less than 10 products in this collection.\n{% endif %}",
1374
- "parameter": false,
1375
- "display_type": "text",
1376
- "show_data_tab": false
1377
- }
1378
- ],
1379
- "return_type": [
1380
- {
1381
- "type": "number",
1382
- "name": "",
1383
- "description": "",
1384
- "array_value": ""
1385
- }
1386
- ],
1387
- "summary": "Returns the size of a string or array.",
1388
- "name": "size"
1389
- },
1390
- {
1391
- "deprecated": false,
1392
- "deprecation_reason": "",
1393
- "description": "",
1394
- "examples": [
1395
- {
1396
- "name": "",
1397
- "description": "",
1398
- "syntax": "",
1399
- "path": "/products/health-potion",
1400
- "raw_liquid": "{{ product.title | downcase }}",
1401
- "parameter": false,
1402
- "display_type": "text",
1403
- "show_data_tab": true
1404
- }
1405
- ],
1406
- "return_type": [
1407
- {
1408
- "type": "string",
1409
- "name": "",
1410
- "description": "",
1411
- "array_value": ""
1412
- }
1413
- ],
1414
- "summary": "Converts a string to all lowercase characters.",
1415
- "name": "downcase"
1416
- },
1417
- {
1418
- "deprecated": false,
1419
- "deprecation_reason": "",
1420
- "description": "",
1421
- "examples": [
1422
- {
1423
- "name": "",
1424
- "description": "",
1425
- "syntax": "",
1426
- "path": "/products/health-potion",
1427
- "raw_liquid": "{{ product.title | upcase }}",
1428
- "parameter": false,
1429
- "display_type": "text",
1430
- "show_data_tab": true
1431
- }
1432
- ],
1433
- "return_type": [
1434
- {
1435
- "type": "string",
1436
- "name": "",
1437
- "description": "",
1438
- "array_value": ""
1439
- }
1440
- ],
1441
- "summary": "Converts a string to all uppercase characters.",
1442
- "name": "upcase"
1443
- },
1444
- {
1445
- "deprecated": false,
1446
- "deprecation_reason": "",
1447
- "description": "",
1448
- "examples": [
1449
- {
1450
- "name": "",
1451
- "description": "",
1452
- "syntax": "",
1453
- "path": "/",
1454
- "raw_liquid": "{{ 'this sentence should start with a capitalized word.' | capitalize }}",
1455
- "parameter": false,
1456
- "display_type": "text",
1457
- "show_data_tab": true
1458
- }
1459
- ],
1460
- "return_type": [
1461
- {
1462
- "type": "string",
1463
- "name": "",
1464
- "description": "",
1465
- "array_value": ""
1466
- }
1467
- ],
1468
- "summary": "Capitalizes the first word in a string and downcases the remaining characters.",
1469
- "name": "capitalize"
1470
- },
1471
- {
1472
- "deprecated": false,
1473
- "deprecation_reason": "",
1474
- "description": "",
1475
- "examples": [
1476
- {
1477
- "name": "",
1478
- "description": "",
1479
- "syntax": "",
1480
- "path": "/",
1481
- "raw_liquid": "{{ '<p>Text to be escaped.</p>' | escape }}",
1482
- "parameter": false,
1483
- "display_type": "text",
1484
- "show_data_tab": true
1485
- }
1486
- ],
1487
- "return_type": [
1488
- {
1489
- "type": "string",
1490
- "name": "",
1491
- "description": "",
1492
- "array_value": ""
1493
- }
1494
- ],
1495
- "summary": "Escapes special characters in HTML, such as `<>`, `'`, and `&`, and converts characters into escape sequences. The filter doesn't effect characters within the string that don’t have a corresponding escape sequence.\".",
1496
- "name": "escape"
1497
- },
1498
- {
1499
- "deprecated": false,
1500
- "deprecation_reason": "",
1501
- "description": "",
1502
- "examples": [
1503
- {
1504
- "name": "",
1505
- "description": "",
1506
- "syntax": "",
1507
- "path": "/",
1508
- "raw_liquid": "# applying the escape filter to already escaped text escapes characters in HTML entities:\n\n{{ \"<p>Text to be escaped.</p>\" | escape }}\n\n# applying the escape_once filter to already escaped text skips characters in HTML entities:\n\n{{ \"<p>Text to be escaped.</p>\" | escape_once }}\n\n# use escape_once to escape strings where a combination of HTML entities and non-escaped characters might be present:\n\n{{ \"<p>Text to be escaped.</p> & some additional text\" | escape_once }}",
1509
- "parameter": false,
1510
- "display_type": "text",
1511
- "show_data_tab": true
1512
- }
1513
- ],
1514
- "return_type": [
1515
- {
1516
- "type": "string",
1517
- "name": "",
1518
- "description": "",
1519
- "array_value": ""
1520
- }
1521
- ],
1522
- "summary": "Escapes a string without changing characters that have already been escaped.",
1523
- "name": "escape_once"
1524
- },
1525
- {
1526
- "deprecated": false,
1527
- "deprecation_reason": "",
1528
- "description": "> Note:\n> Spaces are converted to a `+` character, instead of a percent-encoded character.",
1529
- "examples": [
1530
- {
1531
- "name": "",
1532
- "description": "",
1533
- "syntax": "",
1534
- "path": "/",
1535
- "raw_liquid": "{{ 'test@test.com' | url_encode }}",
1536
- "parameter": false,
1537
- "display_type": "text",
1538
- "show_data_tab": true
1539
- }
1540
- ],
1541
- "return_type": [
1542
- {
1543
- "type": "string",
1544
- "name": "",
1545
- "description": "",
1546
- "array_value": ""
1547
- }
1548
- ],
1549
- "summary": "Converts any URL-unsafe characters in a string to the\n[percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) equivalent.",
1550
- "name": "url_encode"
1551
- },
1552
- {
1553
- "deprecated": false,
1554
- "deprecation_reason": "",
1555
- "description": "",
1556
- "examples": [
1557
- {
1558
- "name": "",
1559
- "description": "",
1560
- "syntax": "",
1561
- "path": "/",
1562
- "raw_liquid": "{{ 'test%40test.com' | url_decode }}",
1563
- "parameter": false,
1564
- "display_type": "text",
1565
- "show_data_tab": true
1566
- }
1567
- ],
1568
- "return_type": [
1569
- {
1570
- "type": "string",
1571
- "name": "",
1572
- "description": "",
1573
- "array_value": ""
1574
- }
1575
- ],
1576
- "summary": "Decodes any [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) characters\nin a string.",
1577
- "name": "url_decode"
1578
- },
1579
- {
1580
- "deprecated": false,
1581
- "deprecation_reason": "",
1582
- "description": "",
1583
- "examples": [
1584
- {
1585
- "name": "",
1586
- "description": "",
1587
- "syntax": "",
1588
- "path": "/",
1589
- "raw_liquid": "{{ 'one two three' | base64_encode }}",
1590
- "parameter": false,
1591
- "display_type": "text",
1592
- "show_data_tab": true
1593
- }
1594
- ],
1595
- "return_type": [
1596
- {
1597
- "type": "string",
1598
- "name": "",
1599
- "description": "",
1600
- "array_value": ""
1601
- }
1602
- ],
1603
- "summary": "Encodes a string to [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1604
- "name": "base64_encode"
1605
- },
1606
- {
1607
- "deprecated": false,
1608
- "deprecation_reason": "",
1609
- "description": "",
1610
- "examples": [
1611
- {
1612
- "name": "",
1613
- "description": "",
1614
- "syntax": "",
1615
- "path": "/",
1616
- "raw_liquid": "{{ 'b25lIHR3byB0aHJlZQ==' | base64_decode }}",
1617
- "parameter": false,
1618
- "display_type": "text",
1619
- "show_data_tab": true
1620
- }
1621
- ],
1622
- "return_type": [
1623
- {
1624
- "type": "string",
1625
- "name": "",
1626
- "description": "",
1627
- "array_value": ""
1628
- }
1629
- ],
1630
- "summary": "Decodes a string in [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1631
- "name": "base64_decode"
1632
- },
1633
- {
1634
- "deprecated": false,
1635
- "deprecation_reason": "",
1636
- "description": "",
1637
- "examples": [
1638
- {
1639
- "name": "",
1640
- "description": "To produce URL-safe Base64, this filter uses `-` and `_` in place of `+` and `/`.",
1641
- "syntax": "",
1642
- "path": "/",
1643
- "raw_liquid": "{{ 'one two three' | base64_url_safe_encode }}",
1644
- "parameter": false,
1645
- "display_type": "text",
1646
- "show_data_tab": true
1647
- }
1648
- ],
1649
- "return_type": [
1650
- {
1651
- "type": "string",
1652
- "name": "",
1653
- "description": "",
1654
- "array_value": ""
1655
- }
1656
- ],
1657
- "summary": "Encodes a string to URL-safe [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1658
- "name": "base64_url_safe_encode"
1659
- },
1660
- {
1661
- "deprecated": false,
1662
- "deprecation_reason": "",
1663
- "description": "",
1664
- "examples": [
1665
- {
1666
- "name": "",
1667
- "description": "",
1668
- "syntax": "",
1669
- "path": "/",
1670
- "raw_liquid": "{{ 'b25lIHR3byB0aHJlZQ==' | base64_url_safe_decode }}",
1671
- "parameter": false,
1672
- "display_type": "text",
1673
- "show_data_tab": true
1674
- }
1675
- ],
1676
- "return_type": [
1677
- {
1678
- "type": "string",
1679
- "name": "",
1680
- "description": "",
1681
- "array_value": ""
1682
- }
1683
- ],
1684
- "summary": "Decodes a string in URL-safe [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1685
- "name": "base64_url_safe_decode"
1686
- },
1687
- {
1688
- "deprecated": false,
1689
- "deprecation_reason": "",
1690
- "description": "By default, the substring has a length of one character, and the array series has one array item. However, you can\nprovide a second parameter to specify the number of characters or array items.",
1691
- "examples": [
1692
- {
1693
- "name": "",
1694
- "description": "",
1695
- "syntax": "",
1696
- "path": "/collections/all",
1697
- "raw_liquid": "{{ collection.title | slice: 0 }}\n{{ collection.title | slice: 0, 5 }}\n\n{{ collection.all_tags | slice: 1, 2 | join: ', ' }}",
1698
- "parameter": false,
1699
- "display_type": "text",
1700
- "show_data_tab": true
1701
- },
1702
- {
1703
- "name": "Negative index",
1704
- "description": "You can supply a negative index which will count from the end of the string.\n",
1705
- "syntax": "",
1706
- "path": "/collections/all",
1707
- "raw_liquid": "{{ collection.title | slice: -3, 3 }}",
1708
- "parameter": false,
1709
- "display_type": "text",
1710
- "show_data_tab": true
1711
- }
1712
- ],
1713
- "return_type": [
1714
- {
1715
- "type": "string",
1716
- "name": "",
1717
- "description": "",
1718
- "array_value": ""
1719
- }
1720
- ],
1721
- "summary": "Returns a substring or series of array items, starting at a given 0-based index.",
1722
- "name": "slice"
1723
- },
1724
- {
1725
- "deprecated": false,
1726
- "deprecation_reason": "",
1727
- "description": "If the specified number of characters is less than the length of the string, then an ellipsis (`...`) is appended to\nthe truncated string. The ellipsis is included in the character count of the truncated string.",
1728
- "examples": [
1729
- {
1730
- "name": "",
1731
- "description": "",
1732
- "syntax": "",
1733
- "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1734
- "raw_liquid": "{{ article.title | truncate: 15 }}",
1735
- "parameter": false,
1736
- "display_type": "text",
1737
- "show_data_tab": true
1738
- },
1739
- {
1740
- "name": "Specify a custom ellipsis",
1741
- "description": "You can provide a second parameter to specify a custom ellipsis. If you don't want an ellipsis, then you can supply an empty string.\n",
1742
- "syntax": "string | truncate: number, string",
1743
- "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1744
- "raw_liquid": "{{ article.title | truncate: 15, '--' }}\n{{ article.title | truncate: 15, '' }}",
1745
- "parameter": true,
1746
- "display_type": "text",
1747
- "show_data_tab": true
1748
- }
1749
- ],
1750
- "return_type": [
1751
- {
1752
- "type": "string",
1753
- "name": "",
1754
- "description": "",
1755
- "array_value": ""
1756
- }
1757
- ],
1758
- "summary": "Truncates a string down to a given number of characters.",
1759
- "name": "truncate"
1760
- },
1761
- {
1762
- "deprecated": false,
1763
- "deprecation_reason": "",
1764
- "description": "If the specified number of words is less than the number of words in the string, then an ellipsis (`...`) is appended to\nthe truncated string.\n\n> Caution:\n> HTML tags are treated as words, so you should strip any HTML from truncated content. If you don't strip HTML, then\n> closing HTML tags can be removed, which can result in unexpected behavior.",
1765
- "examples": [
1766
- {
1767
- "name": "",
1768
- "description": "",
1769
- "syntax": "",
1770
- "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1771
- "raw_liquid": "{{ article.content | strip_html | truncatewords: 15 }}",
1772
- "parameter": false,
1773
- "display_type": "text",
1774
- "show_data_tab": true
1775
- },
1776
- {
1777
- "name": "Specify a custom ellipsis",
1778
- "description": "You can provide a second parameter to specify a custom ellipsis. If you don't want an ellipsis, then you can supply an empty string.\n",
1779
- "syntax": "string | truncatewords: number, string",
1780
- "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1781
- "raw_liquid": "{{ article.content | strip_html | truncatewords: 15, '--' }}\n\n{{ article.content | strip_html | truncatewords: 15, '' }}",
1782
- "parameter": true,
1783
- "display_type": "text",
1784
- "show_data_tab": true
1785
- }
1786
- ],
1787
- "return_type": [
1788
- {
1789
- "type": "string",
1790
- "name": "",
1791
- "description": "",
1792
- "array_value": ""
1793
- }
1794
- ],
1795
- "summary": "Truncates a string down to a given number of words.",
1796
- "name": "truncatewords"
1797
- },
1798
- {
1799
- "deprecated": false,
1800
- "deprecation_reason": "",
1801
- "description": "",
1802
- "examples": [
1803
- {
1804
- "name": "",
1805
- "description": "",
1806
- "syntax": "",
1807
- "path": "/products/health-potion",
1808
- "raw_liquid": "{%- assign title_words = product.handle | split: '-' -%}\n\n{% for word in title_words -%}\n {{ word }}\n{%- endfor %}",
1809
- "parameter": false,
1810
- "display_type": "text",
1811
- "show_data_tab": true
1812
- }
1813
- ],
1814
- "return_type": [
1815
- {
1816
- "type": "array",
1817
- "name": "",
1818
- "description": "",
1819
- "array_value": "string"
1820
- }
1821
- ],
1822
- "summary": "Splits a string into an array of substrings based on a given separator.",
1823
- "name": "split"
1824
- },
1825
- {
1826
- "deprecated": false,
1827
- "deprecation_reason": "",
1828
- "description": "",
1829
- "examples": [
1830
- {
1831
- "name": "",
1832
- "description": "",
1833
- "syntax": "",
1834
- "path": "/",
1835
- "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | strip }}\"",
1836
- "parameter": false,
1837
- "display_type": "text",
1838
- "show_data_tab": true
1839
- }
1840
- ],
1841
- "return_type": [
1842
- {
1843
- "type": "string",
1844
- "name": "",
1845
- "description": "",
1846
- "array_value": ""
1847
- }
1848
- ],
1849
- "summary": "Strips all whitespace from the left and right of a string.",
1850
- "name": "strip"
1851
- },
1852
- {
1853
- "deprecated": false,
1854
- "deprecation_reason": "",
1855
- "description": "",
1856
- "examples": [
1857
- {
1858
- "name": "",
1859
- "description": "",
1860
- "syntax": "",
1861
- "path": "/",
1862
- "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | lstrip }}\"",
1863
- "parameter": false,
1864
- "display_type": "text",
1865
- "show_data_tab": true
1866
- }
1867
- ],
1868
- "return_type": [
1869
- {
1870
- "type": "string",
1871
- "name": "",
1872
- "description": "",
1873
- "array_value": ""
1874
- }
1875
- ],
1876
- "summary": "Strips all whitespace from the left of a string.",
1877
- "name": "lstrip"
1878
- },
1879
- {
1880
- "deprecated": false,
1881
- "deprecation_reason": "",
1882
- "description": "",
1883
- "examples": [
1884
- {
1885
- "name": "",
1886
- "description": "",
1887
- "syntax": "",
1888
- "path": "/",
1889
- "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | rstrip }}\"",
1890
- "parameter": false,
1891
- "display_type": "text",
1892
- "show_data_tab": true
1893
- }
1894
- ],
1895
- "return_type": [
1896
- {
1897
- "type": "string",
1898
- "name": "",
1899
- "description": "",
1900
- "array_value": ""
1901
- }
1902
- ],
1903
- "summary": "Strips all whitespace from the right of a string.",
1904
- "name": "rstrip"
1905
- },
1906
- {
1907
- "deprecated": false,
1908
- "deprecation_reason": "",
1909
- "description": "",
1910
- "examples": [
1911
- {
1912
- "name": "",
1913
- "description": "",
1914
- "syntax": "",
1915
- "path": "/products/health-potion",
1916
- "raw_liquid": "<!-- With HTML -->\n{{ product.description }}\n\n<!-- HTML stripped -->\n{{ product.description | strip_html }}",
1917
- "parameter": false,
1918
- "display_type": "text",
1919
- "show_data_tab": true
1920
- }
1921
- ],
1922
- "return_type": [
1923
- {
1924
- "type": "string",
1925
- "name": "",
1926
- "description": "",
1927
- "array_value": ""
1928
- }
1929
- ],
1930
- "summary": "Strips all HTML tags from a string.",
1931
- "name": "strip_html"
1932
- },
1933
- {
1934
- "deprecated": false,
1935
- "deprecation_reason": "",
1936
- "description": "",
1937
- "examples": [
1938
- {
1939
- "name": "",
1940
- "description": "",
1941
- "syntax": "",
1942
- "path": "/products/health-potion",
1943
- "raw_liquid": "<!-- With newlines -->\n{{ product.description }}\n\n<!-- Newlines stripped -->\n{{ product.description | strip_newlines }}",
1944
- "parameter": false,
1945
- "display_type": "text",
1946
- "show_data_tab": true
1947
- }
1948
- ],
1949
- "return_type": [
1950
- {
1951
- "type": "string",
1952
- "name": "",
1953
- "description": "",
1954
- "array_value": ""
1955
- }
1956
- ],
1957
- "summary": "Strips all newline characters (line breaks) from a string.",
1958
- "name": "strip_newlines"
1959
- },
1960
- {
1961
- "deprecated": false,
1962
- "deprecation_reason": "",
1963
- "description": "",
1964
- "examples": [
1965
- {
1966
- "name": "",
1967
- "description": "",
1968
- "syntax": "",
1969
- "path": "/collections/sale-potions",
1970
- "raw_liquid": "{{ collection.all_tags | join }}",
1971
- "parameter": false,
1972
- "display_type": "text",
1973
- "show_data_tab": true
1974
- },
1975
- {
1976
- "name": "Custom separator",
1977
- "description": "You can specify a custom separator for the joined items.\n",
1978
- "syntax": "array | join: string",
1979
- "path": "/collections/sale-potions",
1980
- "raw_liquid": "{{ collection.all_tags | join: ', ' }}",
1981
- "parameter": true,
1982
- "display_type": "text",
1983
- "show_data_tab": true
1984
- }
1985
- ],
1986
- "return_type": [
1987
- {
1988
- "type": "string",
1989
- "name": "",
1990
- "description": "",
1991
- "array_value": ""
1992
- }
1993
- ],
1994
- "summary": "Combines all of the items in an array into a single string, separated by a space.",
1995
- "name": "join"
1996
- },
1997
- {
1998
- "deprecated": false,
1999
- "deprecation_reason": "",
2000
- "description": "",
2001
- "examples": [
2002
- {
2003
- "name": "",
2004
- "description": "",
2005
- "syntax": "",
2006
- "path": "/collections/all",
2007
- "raw_liquid": "{% assign tags = collection.all_tags | sort %}\n\n{% for tag in tags -%}\n {{ tag }}\n{%- endfor %}",
2008
- "parameter": false,
2009
- "display_type": "text",
2010
- "show_data_tab": true
2011
- },
2012
- {
2013
- "name": "Sort by an array item property",
2014
- "description": "You can specify an array item property to sort the array items by. You can sort by any property of the object that you're sorting.\n",
2015
- "syntax": "array | sort: string",
2016
- "path": "/collections/all",
2017
- "raw_liquid": "{% assign products = collection.products | sort: 'price' %}\n\n{% for product in products -%}\n {{ product.title }}\n{%- endfor %}",
2018
- "parameter": true,
2019
- "display_type": "text",
2020
- "show_data_tab": true
2021
- }
2022
- ],
2023
- "return_type": [
2024
- {
2025
- "type": "array",
2026
- "name": "",
2027
- "description": "",
2028
- "array_value": "untyped"
2029
- }
2030
- ],
2031
- "summary": "Sorts the items in an array in case-sensitive alphabetical, or numerical, order.",
2032
- "name": "sort"
2033
- },
2034
- {
2035
- "deprecated": false,
2036
- "deprecation_reason": "",
2037
- "description": "> Caution:\n> You shouldn't use the `sort_natural` filter to sort numerical values. When comparing items an array, each item is converted to a\n> string, so sorting on numerical values can lead to unexpected results.",
2038
- "examples": [
2039
- {
2040
- "name": "",
2041
- "description": "",
2042
- "syntax": "",
2043
- "path": "/collections/all",
2044
- "raw_liquid": "{% assign tags = collection.all_tags | sort_natural %}\n\n{% for tag in tags -%}\n {{ tag }}\n{%- endfor %}",
2045
- "parameter": false,
2046
- "display_type": "text",
2047
- "show_data_tab": true
2048
- },
2049
- {
2050
- "name": "Sort by an array item property",
2051
- "description": "You can specify an array item property to sort the array items by.\n",
2052
- "syntax": "array | sort_natural: string",
2053
- "path": "/collections/all",
2054
- "raw_liquid": "{% assign products = collection.products | sort_natural: 'title' %}\n\n{% for product in products -%}\n {{ product.title }}\n{%- endfor %}",
2055
- "parameter": true,
2056
- "display_type": "text",
2057
- "show_data_tab": true
2058
- }
2059
- ],
2060
- "return_type": [
2061
- {
2062
- "type": "array",
2063
- "name": "",
2064
- "description": "",
2065
- "array_value": "untyped"
2066
- }
2067
- ],
2068
- "summary": "Sorts the items in an array in case-insensitive alphabetical order.",
2069
- "name": "sort_natural"
2070
- },
2071
- {
2072
- "deprecated": false,
2073
- "deprecation_reason": "",
2074
- "description": "This requires you to provide both the property name and the associated value.",
2075
- "examples": [
2076
- {
2077
- "name": "",
2078
- "description": "",
2079
- "syntax": "",
2080
- "path": "/collections/all",
2081
- "raw_liquid": "{% assign polina_products = collection.products | where: 'vendor', \"Polina's Potent Potions\" %}\n\nProducts from Polina's Potent Potions:\n\n{% for product in polina_products -%}\n - {{ product.title }}\n{%- endfor %}",
2082
- "parameter": false,
2083
- "display_type": "text",
2084
- "show_data_tab": true
2085
- },
2086
- {
2087
- "name": "Filter for boolean properties with a `true` value",
2088
- "description": "You can filter for items that have a `true` value for a boolean property. This requires you to provide only the property name.\n",
2089
- "syntax": "",
2090
- "path": "/collections/all",
2091
- "raw_liquid": "{% assign available_products = collection.products | where: 'available' %}\n\nAvailable products:\n\n{% for product in available_products -%}\n - {{ product.title }}\n{%- endfor %}",
2092
- "parameter": false,
2093
- "display_type": "text",
2094
- "show_data_tab": true
2095
- }
2096
- ],
2097
- "return_type": [
2098
- {
2099
- "type": "array",
2100
- "name": "",
2101
- "description": "",
2102
- "array_value": "untyped"
2103
- }
2104
- ],
2105
- "summary": "Filters an array to include only items with a specific property value.",
2106
- "name": "where"
2107
- },
2108
- {
2109
- "deprecated": false,
2110
- "deprecation_reason": "",
2111
- "description": "",
2112
- "examples": [
2113
- {
2114
- "name": "",
2115
- "description": "",
2116
- "syntax": "",
2117
- "path": "/",
2118
- "raw_liquid": "{% assign potion_array = 'invisibility, health, love, health, invisibility' | split: ', ' %}\n\n{{ potion_array | uniq | join: ', ' }}",
2119
- "parameter": false,
2120
- "display_type": "text",
2121
- "show_data_tab": true
2122
- }
2123
- ],
2124
- "return_type": [
2125
- {
2126
- "type": "array",
2127
- "name": "",
2128
- "description": "",
2129
- "array_value": "untyped"
2130
- }
2131
- ],
2132
- "summary": "Removes any duplicate items in an array.",
2133
- "name": "uniq"
2134
- },
2135
- {
2136
- "deprecated": false,
2137
- "deprecation_reason": "",
2138
- "description": "",
2139
- "examples": [
2140
- {
2141
- "name": "",
2142
- "description": "",
2143
- "syntax": "",
2144
- "path": "/collections/sale-potions",
2145
- "raw_liquid": "Original order:\n{{ collection.products | map: 'title' | join: ', ' }}\n\nReverse order:\n{{ collection.products | reverse | map: 'title' | join: ', ' }}",
2146
- "parameter": false,
2147
- "display_type": "text",
2148
- "show_data_tab": true
2149
- },
2150
- {
2151
- "name": "Reversing strings",
2152
- "description": "You can't use the `reverse` filter on strings directly. However, you can use the [`split` filter](/docs/api/liquid/filters/split) to create an array of characters in the string, reverse that array, and then use the [`join` filter](/docs/api/liquid/filters/join) to combine them again.\n",
2153
- "syntax": "",
2154
- "path": "/collections/sale-potions",
2155
- "raw_liquid": "{{ collection.title | split: '' | reverse | join: '' }}",
2156
- "parameter": false,
2157
- "display_type": "text",
2158
- "show_data_tab": true
2159
- }
2160
- ],
2161
- "return_type": [
2162
- {
2163
- "type": "array",
2164
- "name": "",
2165
- "description": "",
2166
- "array_value": "untyped"
2167
- }
2168
- ],
2169
- "summary": "Reverses the order of the items in an array.",
2170
- "name": "reverse"
2171
- },
2172
- {
2173
- "deprecated": false,
2174
- "deprecation_reason": "",
2175
- "description": "",
2176
- "examples": [
2177
- {
2178
- "name": "",
2179
- "description": "",
2180
- "syntax": "",
2181
- "path": "/collections/sale-potions",
2182
- "raw_liquid": "{%- assign product_titles = collection.products | map: 'title' -%}\n\n{{ product_titles | join: ', ' }}",
2183
- "parameter": false,
2184
- "display_type": "text",
2185
- "show_data_tab": true
2186
- }
2187
- ],
2188
- "return_type": [
2189
- {
2190
- "type": "array",
2191
- "name": "",
2192
- "description": "",
2193
- "array_value": "untyped"
2194
- }
2195
- ],
2196
- "summary": "Creates an array of values from a specific property of the items in an array.",
2197
- "name": "map"
2198
- },
2199
- {
2200
- "deprecated": false,
2201
- "deprecation_reason": "",
2202
- "description": "",
2203
- "examples": [
2204
- {
2205
- "name": "",
2206
- "description": "",
2207
- "syntax": "",
2208
- "path": "/collections/all",
2209
- "raw_liquid": "{%- assign original_prices = collection.products | map: 'compare_at_price' -%}\n\nOriginal prices:\n\n{% for price in original_prices -%}\n - {{ price }}\n{%- endfor %}\n\n{%- assign compacted_original_prices = original_prices | compact -%}\n\nOriginal prices - compacted:\n\n{% for price in compacted_original_prices -%}\n - {{ price }}\n{%- endfor %}",
2210
- "parameter": false,
2211
- "display_type": "text",
2212
- "show_data_tab": true
2213
- }
2214
- ],
2215
- "return_type": [
2216
- {
2217
- "type": "array",
2218
- "name": "",
2219
- "description": "",
2220
- "array_value": "untyped"
2221
- }
2222
- ],
2223
- "summary": "Removes any `nil` items from an array.",
2224
- "name": "compact"
2225
- },
2226
- {
2227
- "deprecated": false,
2228
- "deprecation_reason": "",
2229
- "description": "",
2230
- "examples": [
2231
- {
2232
- "name": "",
2233
- "description": "",
2234
- "syntax": "",
2235
- "path": "/products/komodo-dragon-scale",
2236
- "raw_liquid": "{{ product.handle | replace: '-', ' ' }}",
2237
- "parameter": false,
2238
- "display_type": "text",
2239
- "show_data_tab": true
2240
- }
2241
- ],
2242
- "return_type": [
2243
- {
2244
- "type": "string",
2245
- "name": "",
2246
- "description": "",
2247
- "array_value": ""
2248
- }
2249
- ],
2250
- "summary": "Replaces any instance of a substring inside a string with a given string.",
2251
- "name": "replace"
2252
- },
2253
- {
2254
- "deprecated": false,
2255
- "deprecation_reason": "",
2256
- "description": "",
2257
- "examples": [
2258
- {
2259
- "name": "",
2260
- "description": "",
2261
- "syntax": "",
2262
- "path": "/products/komodo-dragon-scale",
2263
- "raw_liquid": "{{ product.handle | replace_first: '-', ' ' }}",
2264
- "parameter": false,
2265
- "display_type": "text",
2266
- "show_data_tab": true
2267
- }
2268
- ],
2269
- "return_type": [
2270
- {
2271
- "type": "string",
2272
- "name": "",
2273
- "description": "",
2274
- "array_value": ""
2275
- }
2276
- ],
2277
- "summary": "Replaces the first instance of a substring inside a string with a given string.",
2278
- "name": "replace_first"
2279
- },
2280
- {
2281
- "deprecated": false,
2282
- "deprecation_reason": "",
2283
- "description": "",
2284
- "examples": [
2285
- {
2286
- "name": "",
2287
- "description": "",
2288
- "syntax": "",
2289
- "path": "/products/komodo-dragon-scale",
2290
- "raw_liquid": "{{ product.handle | replace_last: '-', ' ' }}",
2291
- "parameter": false,
2292
- "display_type": "text",
2293
- "show_data_tab": true
2294
- }
2295
- ],
2296
- "return_type": [
2297
- {
2298
- "type": "string",
2299
- "name": "",
2300
- "description": "",
2301
- "array_value": ""
2302
- }
2303
- ],
2304
- "summary": "Replaces the last instance of a substring inside a string with a given string.",
2305
- "name": "replace_last"
2306
- },
2307
- {
2308
- "deprecated": false,
2309
- "deprecation_reason": "",
2310
- "description": "",
2311
- "examples": [
2312
- {
2313
- "name": "",
2314
- "description": "",
2315
- "syntax": "",
2316
- "path": "/",
2317
- "raw_liquid": "{{ \"I can't do it!\" | remove: \"'t\" }}",
2318
- "parameter": false,
2319
- "display_type": "text",
2320
- "show_data_tab": true
2321
- }
2322
- ],
2323
- "return_type": [
2324
- {
2325
- "type": "string",
2326
- "name": "",
2327
- "description": "",
2328
- "array_value": ""
2329
- }
2330
- ],
2331
- "summary": "Removes any instance of a substring inside a string.",
2332
- "name": "remove"
2333
- },
2334
- {
2335
- "deprecated": false,
2336
- "deprecation_reason": "",
2337
- "description": "",
2338
- "examples": [
2339
- {
2340
- "name": "",
2341
- "description": "",
2342
- "syntax": "",
2343
- "path": "/",
2344
- "raw_liquid": "{{ \"I hate it when I accidentally spill my duplication potion accidentally!\" | remove_first: ' accidentally' }}",
2345
- "parameter": false,
2346
- "display_type": "text",
2347
- "show_data_tab": true
2348
- }
2349
- ],
2350
- "return_type": [
2351
- {
2352
- "type": "string",
2353
- "name": "",
2354
- "description": "",
2355
- "array_value": ""
2356
- }
2357
- ],
2358
- "summary": "Removes the first instance of a substring inside a string.",
2359
- "name": "remove_first"
2360
- },
2361
- {
2362
- "deprecated": false,
2363
- "deprecation_reason": "",
2364
- "description": "",
2365
- "examples": [
2366
- {
2367
- "name": "",
2368
- "description": "",
2369
- "syntax": "",
2370
- "path": "/",
2371
- "raw_liquid": "{{ \"I hate it when I accidentally spill my duplication potion accidentally!\" | remove_last: ' accidentally' }}",
2372
- "parameter": false,
2373
- "display_type": "text",
2374
- "show_data_tab": true
2375
- }
2376
- ],
2377
- "return_type": [
2378
- {
2379
- "type": "string",
2380
- "name": "",
2381
- "description": "",
2382
- "array_value": ""
2383
- }
2384
- ],
2385
- "summary": "Removes the last instance of a substring inside a string.",
2386
- "name": "remove_last"
2387
- },
2388
- {
2389
- "deprecated": false,
2390
- "deprecation_reason": "",
2391
- "description": "",
2392
- "examples": [
2393
- {
2394
- "name": "",
2395
- "description": "",
2396
- "syntax": "",
2397
- "path": "/products/health-potion",
2398
- "raw_liquid": "{%- assign path = product.url -%}\n\n{{ request.origin | append: path }}",
2399
- "parameter": false,
2400
- "display_type": "text",
2401
- "show_data_tab": true
2402
- }
2403
- ],
2404
- "return_type": [
2405
- {
2406
- "type": "string",
2407
- "name": "",
2408
- "description": "",
2409
- "array_value": ""
2410
- }
2411
- ],
2412
- "summary": "Adds a given string to the end of a string.",
2413
- "name": "append"
2414
- },
2415
- {
2416
- "deprecated": false,
2417
- "deprecation_reason": "",
2418
- "description": "> Note:\n> The `concat` filter won't filter out duplicates. If you want to remove duplicates, then you need to use the\n> [`uniq` filter](/docs/api/liquid/filters/uniq).",
2419
- "examples": [
2420
- {
2421
- "name": "",
2422
- "description": "",
2423
- "syntax": "",
2424
- "path": "/collections/all",
2425
- "raw_liquid": "{%- assign types_and_vendors = collection.all_types | concat: collection.all_vendors -%}\n\nTypes and vendors:\n\n{% for item in types_and_vendors -%}\n {%- if item != blank -%}\n - {{ item }}\n {%- endif -%}\n{%- endfor %}",
2426
- "parameter": false,
2427
- "display_type": "text",
2428
- "show_data_tab": true
2429
- }
2430
- ],
2431
- "return_type": [
2432
- {
2433
- "type": "array",
2434
- "name": "",
2435
- "description": "",
2436
- "array_value": "untyped"
2437
- }
2438
- ],
2439
- "summary": "Concatenates (combines) two arrays.",
2440
- "name": "concat"
2441
- },
2442
- {
2443
- "deprecated": false,
2444
- "deprecation_reason": "",
2445
- "description": "",
2446
- "examples": [
2447
- {
2448
- "name": "",
2449
- "description": "",
2450
- "syntax": "",
2451
- "path": "/products/health-potion",
2452
- "raw_liquid": "{%- assign origin = request.origin -%}\n\n{{ product.url | prepend: origin }}",
2453
- "parameter": false,
2454
- "display_type": "text",
2455
- "show_data_tab": true
2456
- }
2457
- ],
2458
- "return_type": [
2459
- {
2460
- "type": "string",
2461
- "name": "",
2462
- "description": "",
2463
- "array_value": ""
2464
- }
2465
- ],
2466
- "summary": "Adds a given string to the beginning of a string.",
2467
- "name": "prepend"
2468
- },
2469
- {
2470
- "deprecated": false,
2471
- "deprecation_reason": "",
2472
- "description": "",
2473
- "examples": [
2474
- {
2475
- "name": "",
2476
- "description": "",
2477
- "syntax": "",
2478
- "path": "/products/health-potion",
2479
- "raw_liquid": "{{ product.description | newline_to_br }}",
2480
- "parameter": false,
2481
- "display_type": "text",
2482
- "show_data_tab": true
2483
- }
2484
- ],
2485
- "return_type": [
2486
- {
2487
- "type": "string",
2488
- "name": "",
2489
- "description": "",
2490
- "array_value": ""
2491
- }
2492
- ],
2493
- "summary": "Converts newlines (`\\n`) in a string to HTML line breaks (`<br>`).",
2494
- "name": "newline_to_br"
2495
- },
2496
- {
2497
- "deprecated": false,
2498
- "deprecation_reason": "",
2499
- "description": "",
2500
- "examples": [
2501
- {
2502
- "name": "",
2503
- "description": "",
2504
- "syntax": "",
2505
- "path": "/collections/all",
2506
- "raw_liquid": "{%- assign first_product = collection.products | first -%}\n\n{{ first_product.title }}",
2507
- "parameter": false,
2508
- "display_type": "text",
2509
- "show_data_tab": true
2510
- },
2511
- {
2512
- "name": "Dot notation",
2513
- "description": "You can use the `first` filter with dot notation when you need to use it inside a tag or object output.\n",
2514
- "syntax": "",
2515
- "path": "/collections/all",
2516
- "raw_liquid": "{{ collection.products.first.title }}",
2517
- "parameter": false,
2518
- "display_type": "text",
2519
- "show_data_tab": true
2520
- }
2521
- ],
2522
- "return_type": [
2523
- {
2524
- "type": "untyped",
2525
- "name": "",
2526
- "description": "",
2527
- "array_value": ""
2528
- }
2529
- ],
2530
- "summary": "Returns the first item in an array.",
2531
- "name": "first"
2532
- },
2533
- {
2534
- "deprecated": false,
2535
- "deprecation_reason": "",
2536
- "description": "",
2537
- "examples": [
2538
- {
2539
- "name": "",
2540
- "description": "",
2541
- "syntax": "",
2542
- "path": "/collections/all",
2543
- "raw_liquid": "{%- assign last_product = collection.products | last -%}\n\n{{ last_product.title }}",
2544
- "parameter": false,
2545
- "display_type": "text",
2546
- "show_data_tab": true
2547
- },
2548
- {
2549
- "name": "Dot notation",
2550
- "description": "You can use the `last` filter with dot notation when you need to use it inside a tag or object output.\n",
2551
- "syntax": "",
2552
- "path": "/collections/all",
2553
- "raw_liquid": "{{ collection.products.last.title }}",
2554
- "parameter": false,
2555
- "display_type": "text",
2556
- "show_data_tab": true
2557
- }
2558
- ],
2559
- "return_type": [
2560
- {
2561
- "type": "untyped",
2562
- "name": "",
2563
- "description": "",
2564
- "array_value": ""
2565
- }
2566
- ],
2567
- "summary": "Returns the last item in an array.",
2568
- "name": "last"
2569
- },
2570
- {
2571
- "deprecated": false,
2572
- "deprecation_reason": "",
2573
- "description": "",
2574
- "examples": [
2575
- {
2576
- "name": "",
2577
- "description": "",
2578
- "syntax": "",
2579
- "path": "/",
2580
- "raw_liquid": "{{ -3 | abs }}",
2581
- "parameter": false,
2582
- "display_type": "text",
2583
- "show_data_tab": true
2584
- }
2585
- ],
2586
- "return_type": [
2587
- {
2588
- "type": "number",
2589
- "name": "",
2590
- "description": "",
2591
- "array_value": ""
2592
- }
2593
- ],
2594
- "summary": "Returns the absolute value of a number.",
2595
- "name": "abs"
2596
- },
2597
- {
2598
- "deprecated": false,
2599
- "deprecation_reason": "",
2600
- "description": "",
2601
- "examples": [
2602
- {
2603
- "name": "",
2604
- "description": "",
2605
- "syntax": "",
2606
- "path": "/",
2607
- "raw_liquid": "{{ 2 | plus: 2 }}",
2608
- "parameter": false,
2609
- "display_type": "text",
2610
- "show_data_tab": true
2611
- }
2612
- ],
2613
- "return_type": [
2614
- {
2615
- "type": "number",
2616
- "name": "",
2617
- "description": "",
2618
- "array_value": ""
2619
- }
2620
- ],
2621
- "summary": "Adds two numbers.",
2622
- "name": "plus"
2623
- },
2624
- {
2625
- "deprecated": false,
2626
- "deprecation_reason": "",
2627
- "description": "",
2628
- "examples": [
2629
- {
2630
- "name": "",
2631
- "description": "",
2632
- "syntax": "",
2633
- "path": "/",
2634
- "raw_liquid": "{{ 4 | minus: 2 }}",
2635
- "parameter": false,
2636
- "display_type": "text",
2637
- "show_data_tab": true
2638
- }
2639
- ],
2640
- "return_type": [
2641
- {
2642
- "type": "number",
2643
- "name": "",
2644
- "description": "",
2645
- "array_value": ""
2646
- }
2647
- ],
2648
- "summary": "Subtracts a given number from another number.",
2649
- "name": "minus"
2650
- },
2651
- {
2652
- "deprecated": false,
2653
- "deprecation_reason": "",
2654
- "description": "",
2655
- "examples": [
2656
- {
2657
- "name": "",
2658
- "description": "",
2659
- "syntax": "",
2660
- "path": "/",
2661
- "raw_liquid": "{{ 2 | times: 2 }}",
2662
- "parameter": false,
2663
- "display_type": "text",
2664
- "show_data_tab": true
2665
- }
2666
- ],
2667
- "return_type": [
2668
- {
2669
- "type": "number",
2670
- "name": "",
2671
- "description": "",
2672
- "array_value": ""
2673
- }
2674
- ],
2675
- "summary": "Multiplies a number by a given number.",
2676
- "name": "times"
2677
- },
2678
- {
2679
- "deprecated": false,
2680
- "deprecation_reason": "",
2681
- "description": "",
2682
- "examples": [
2683
- {
2684
- "name": "",
2685
- "description": "",
2686
- "syntax": "",
2687
- "path": "/",
2688
- "raw_liquid": "{{ 4 | divided_by: 2 }}\n\n# divisor is an integer\n{{ 20 | divided_by: 7 }}\n\n# divisor is a float \n{{ 20 | divided_by: 7.0 }}",
2689
- "parameter": false,
2690
- "display_type": "text",
2691
- "show_data_tab": true
2692
- }
2693
- ],
2694
- "return_type": [
2695
- {
2696
- "type": "number",
2697
- "name": "",
2698
- "description": "",
2699
- "array_value": ""
2700
- }
2701
- ],
2702
- "summary": "Divides a number by a given number. The `divided_by` filter produces a result of the same type as the divisor. This means if you divide by an integer, the result will be an integer, and if you divide by a float, the result will be a float.",
2703
- "name": "divided_by"
2704
- },
2705
- {
2706
- "deprecated": false,
2707
- "deprecation_reason": "",
2708
- "description": "",
2709
- "examples": [
2710
- {
2711
- "name": "",
2712
- "description": "",
2713
- "syntax": "",
2714
- "path": "/",
2715
- "raw_liquid": "{{ 12 | modulo: 5 }}",
2716
- "parameter": false,
2717
- "display_type": "text",
2718
- "show_data_tab": true
2719
- }
2720
- ],
2721
- "return_type": [
2722
- {
2723
- "type": "number",
2724
- "name": "",
2725
- "description": "",
2726
- "array_value": ""
2727
- }
2728
- ],
2729
- "summary": "Returns the remainder of dividing a number by a given number.",
2730
- "name": "modulo"
2731
- },
2732
- {
2733
- "deprecated": false,
2734
- "deprecation_reason": "",
2735
- "description": "",
2736
- "examples": [
2737
- {
2738
- "name": "",
2739
- "description": "",
2740
- "syntax": "",
2741
- "path": "/",
2742
- "raw_liquid": "{{ 2.7 | round }}\n{{ 1.3 | round }}",
2743
- "parameter": false,
2744
- "display_type": "text",
2745
- "show_data_tab": true
2746
- },
2747
- {
2748
- "name": "Round to a specific number of decimal places",
2749
- "description": "You can specify a number of decimal places to round to. If you don't specify a number, then the `round` filter rounds to the nearest integer.\n",
2750
- "syntax": "",
2751
- "path": "/",
2752
- "raw_liquid": "{{ 3.14159 | round: 2 }}",
2753
- "parameter": true,
2754
- "display_type": "text",
2755
- "show_data_tab": true
2756
- }
2757
- ],
2758
- "return_type": [
2759
- {
2760
- "type": "number",
2761
- "name": "",
2762
- "description": "",
2763
- "array_value": ""
2764
- }
2765
- ],
2766
- "summary": "Rounds a number to the nearest integer.",
2767
- "name": "round"
2768
- },
2769
- {
2770
- "deprecated": false,
2771
- "deprecation_reason": "",
2772
- "description": "",
2773
- "examples": [
2774
- {
2775
- "name": "",
2776
- "description": "",
2777
- "syntax": "",
2778
- "path": "/",
2779
- "raw_liquid": "{{ 1.2 | ceil }}",
2780
- "parameter": false,
2781
- "display_type": "text",
2782
- "show_data_tab": true
2783
- }
2784
- ],
2785
- "return_type": [
2786
- {
2787
- "type": "number",
2788
- "name": "",
2789
- "description": "",
2790
- "array_value": ""
2791
- }
2792
- ],
2793
- "summary": "Rounds a number up to the nearest integer.",
2794
- "name": "ceil"
2795
- },
2796
- {
2797
- "deprecated": false,
2798
- "deprecation_reason": "",
2799
- "description": "",
2800
- "examples": [
2801
- {
2802
- "name": "",
2803
- "description": "",
2804
- "syntax": "",
2805
- "path": "/",
2806
- "raw_liquid": "{{ 1.2 | floor }}",
2807
- "parameter": false,
2808
- "display_type": "text",
2809
- "show_data_tab": true
2810
- }
2811
- ],
2812
- "return_type": [
2813
- {
2814
- "type": "number",
2815
- "name": "",
2816
- "description": "",
2817
- "array_value": ""
2818
- }
2819
- ],
2820
- "summary": "Rounds a number down to the nearest integer.",
2821
- "name": "floor"
2822
- },
2823
- {
2824
- "deprecated": false,
2825
- "deprecation_reason": "",
2826
- "description": "",
2827
- "examples": [
2828
- {
2829
- "name": "",
2830
- "description": "",
2831
- "syntax": "",
2832
- "path": "/",
2833
- "raw_liquid": "{{ 4 | at_least: 5 }}\n{{ 4 | at_least: 3 }}",
2834
- "parameter": false,
2835
- "display_type": "text",
2836
- "show_data_tab": true
2837
- }
2838
- ],
2839
- "return_type": [
2840
- {
2841
- "type": "number",
2842
- "name": "",
2843
- "description": "",
2844
- "array_value": ""
2845
- }
2846
- ],
2847
- "summary": "Limits a number to a minimum value.",
2848
- "name": "at_least"
2849
- },
2850
- {
2851
- "deprecated": false,
2852
- "deprecation_reason": "",
2853
- "description": "",
2854
- "examples": [
2855
- {
2856
- "name": "",
2857
- "description": "",
2858
- "syntax": "",
2859
- "path": "/",
2860
- "raw_liquid": "{{ 6 | at_most: 5 }}\n{{ 4 | at_most: 5 }}",
2861
- "parameter": false,
2862
- "display_type": "text",
2863
- "show_data_tab": true
2864
- }
2865
- ],
2866
- "return_type": [
2867
- {
2868
- "type": "number",
2869
- "name": "",
2870
- "description": "",
2871
- "array_value": ""
2872
- }
2873
- ],
2874
- "summary": "Limits a number to a maximum value.",
2875
- "name": "at_most"
2876
- },
2877
- {
2878
- "deprecated": false,
2879
- "deprecation_reason": "",
2880
- "description": "",
2881
- "examples": [
2882
- {
2883
- "name": "",
2884
- "description": "",
2885
- "syntax": "",
2886
- "path": "/products/health-potion",
2887
- "raw_liquid": "{{ product.selected_variant.url | default: product.url }}",
2888
- "parameter": false,
2889
- "display_type": "text",
2890
- "show_data_tab": true
2891
- },
2892
- {
2893
- "name": "allow_false",
2894
- "description": "By default, the `default` filter's value will be used in place of `false` values. You can use the `allow_false` parameter to allow variables to return `false` instead of the default value.\n",
2895
- "syntax": "variable | default: variable, allow_false: boolean",
2896
- "path": "/products/health-potion",
2897
- "raw_liquid": "{%- assign display_price = false -%}\n\n{{ display_price | default: true, allow_false: true }}",
2898
- "parameter": true,
2899
- "display_type": "text",
2900
- "show_data_tab": true
2901
- }
2902
- ],
2903
- "return_type": [
2904
- {
2905
- "type": "untyped",
2906
- "name": "",
2907
- "description": "",
2908
- "array_value": ""
2909
- }
2910
- ],
2911
- "summary": "Sets a default value for any variable whose value is one of the following:\n\n- [`empty`](/docs/api/liquid/basics#empty)\n- [`false`](/docs/api/liquid/basics#truthy-and-falsy)\n- [`nil`](/docs/api/liquid/basics#nil)",
2912
- "name": "default"
2913
- },
2914
- {
2915
- "deprecated": false,
2916
- "deprecation_reason": "",
2917
- "description": "",
2918
- "examples": [
2919
- {
2920
- "name": "",
2921
- "description": "",
2922
- "syntax": "",
2923
- "path": "/",
2924
- "raw_liquid": "{% assign fibonacci = '0, 1, 1, 2, 3, 5' | split: ', ' %}\n\n{{ fibonacci | sum }}",
2925
- "parameter": false,
2926
- "display_type": "text",
2927
- "show_data_tab": true
2928
- },
2929
- {
2930
- "name": "Sum object property values",
2931
- "description": "For an array of Liquid objects, you can specify a property to sum.",
2932
- "syntax": "array | sum: string",
2933
- "path": "/cart",
2934
- "raw_liquid": "Total quantity of all items in cart:\n{{ cart.items | sum: 'quantity' }}\n\nSubtotal price for all items in cart:\n{{ cart.items | sum: 'final_line_price' | money }}",
2935
- "parameter": true,
2936
- "display_type": "text",
2937
- "show_data_tab": true
2938
- }
2939
- ],
2940
- "return_type": [
2941
- {
2942
- "type": "number",
2943
- "name": "",
2944
- "description": "",
2945
- "array_value": ""
2946
- }
2947
- ],
2948
- "summary": "Returns the sum of all elements in an array.",
2949
- "name": "sum"
2950
1352
  }
2951
1353
  ],
2952
1354
  "summary": "An article, or [blog post](https://help.shopify.com/manual/online-store/blogs/writing-blogs), in a blog.",
@@ -13697,11 +12099,11 @@
13697
12099
  "type": "array",
13698
12100
  "name": "",
13699
12101
  "description": "",
13700
- "array_value": "image"
12102
+ "array_value": "selling_plan_group"
13701
12103
  }
13702
12104
  ],
13703
- "summary": "The images attached to the product.",
13704
- "name": "images"
12105
+ "summary": "The selling plan groups that the variants of the product are included in.",
12106
+ "name": "selling_plan_groups"
13705
12107
  },
13706
12108
  {
13707
12109
  "deprecated": false,
@@ -13955,6 +12357,24 @@
13955
12357
  "summary": "The media attached to the product, sorted by the date it was added to the product.",
13956
12358
  "name": "media"
13957
12359
  },
12360
+ {
12361
+ "deprecated": false,
12362
+ "deprecation_reason": "",
12363
+ "description": "",
12364
+ "examples": [
12365
+
12366
+ ],
12367
+ "return_type": [
12368
+ {
12369
+ "type": "array",
12370
+ "name": "",
12371
+ "description": "",
12372
+ "array_value": "image"
12373
+ }
12374
+ ],
12375
+ "summary": "The images attached to the product.",
12376
+ "name": "images"
12377
+ },
13958
12378
  {
13959
12379
  "deprecated": false,
13960
12380
  "deprecation_reason": "",
@@ -14387,24 +12807,6 @@
14387
12807
  "summary": "Returns `true` if all of the variants of the product require a selling plan. Returns `false` if not.",
14388
12808
  "name": "requires_selling_plan"
14389
12809
  },
14390
- {
14391
- "deprecated": false,
14392
- "deprecation_reason": "",
14393
- "description": "",
14394
- "examples": [
14395
-
14396
- ],
14397
- "return_type": [
14398
- {
14399
- "type": "array",
14400
- "name": "",
14401
- "description": "",
14402
- "array_value": "selling_plan_group"
14403
- }
14404
- ],
14405
- "summary": "The selling plan groups that the variants of the product are included in.",
14406
- "name": "selling_plan_groups"
14407
- },
14408
12810
  {
14409
12811
  "deprecated": false,
14410
12812
  "deprecation_reason": "",
@@ -18125,6 +16527,24 @@
18125
16527
  "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted price.",
18126
16528
  "examples": [
18127
16529
 
16530
+ ],
16531
+ "return_type": [
16532
+ {
16533
+ "type": "number",
16534
+ "name": "",
16535
+ "description": "",
16536
+ "array_value": ""
16537
+ }
16538
+ ],
16539
+ "summary": "The price of the shipping method in the currency's subunit, after discounts have been applied, including order level discounts.",
16540
+ "name": "price_with_discounts"
16541
+ },
16542
+ {
16543
+ "deprecated": true,
16544
+ "deprecation_reason": "Deprecated because the price did not include order level discounts.\n\nThe `shipping_line.price` property has been replaced by [`shipping_line.price_with_discounts`](/docs/api/liquid/objects/shipping_method#shipping_method-price_with_discounts).",
16545
+ "description": "The value is output in the customer's local (presentment) currency.\n\nFor currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.\n\n> Tip:\n> Use [money filters](/docs/api/liquid/filters/money-filters) to output a formatted price.",
16546
+ "examples": [
16547
+
18128
16548
  ],
18129
16549
  "return_type": [
18130
16550
  {