1
- The following examples can be found in full at http://liquidmarkup.org/
1
+ There are a couple of different Liquid variations in circulation. This grammars supports
2
+ both the Standard and Shopify Liquid variations. The following examples can be found in full at:
3
+
4
+ Standard Variation: https://shopify.github.io/liquid
5
+ Shopify Variation: https://shopify.dev/docs/api/liquid
2
6
3
7
Liquid is an extraction from the e-commerce system Shopify.
4
8
Shopify powers many thousands of e-commerce stores which all call for unique designs.
@@ -37,11 +41,18 @@ Some more features include:
37
41
38
42
<h2 >If</h2 >
39
43
<p >
40
- {% if user .name == 'tobi' or user .name == 'marc' %}
44
+ {% if user .name == 'tobi' or user .name == 'marc' %}
41
45
hi marc or tobi
42
46
{% endif %}
43
47
</p >
44
48
49
+ <h2 >Comments</h2 >
50
+
51
+ {% # Line Comment %}
52
+
53
+ {% comment %}
54
+ Block Comment
55
+ {% endcomment %}
45
56
46
57
<h2 >Case</h2 >
47
58
<p >
@@ -58,7 +69,7 @@ Some more features include:
58
69
59
70
<h2 >For Loops</h2 >
60
71
<p >
61
- {% for item in array %}
72
+ {% for item in array %}
62
73
{{ item }}
63
74
{% endfor %}
64
75
</p >
@@ -74,3 +85,43 @@ Some more features include:
74
85
{% endif %}
75
86
{% endtablerow %}
76
87
</p >
88
+
89
+ <h2 >Embedded Code Blocks</h2 >
90
+
91
+ This support Shopify Liquid variation JSON schema code blocks
92
+
93
+ {% schema %}
94
+ {
95
+ "string" : " bar" ,
96
+ "boolean" : true ,
97
+ "number" : 100 ,
98
+ "object" : {
99
+ "array" : [100 , false , " string" , {}, [] ]
100
+ }
101
+ }
102
+ {% endschema %}
103
+
104
+ This support Shopify Liquid variation Stylesheet and Style code blocks
105
+
106
+ {% style %}
107
+ .class {
108
+ font-size : 10px ; /* comment */
109
+ }
110
+ {% endstyle %}
111
+
112
+ {% stylesheet %}
113
+ .class {
114
+ font-size : 10px ; /* comment */
115
+ }
116
+ {% endstylesheet %}
117
+
118
+ This support Shopify Liquid variation JavaScript code blocks
119
+
120
+ {% javascript %}
121
+
122
+ function foo (param ) {
123
+
124
+ return ' something' // comment
125
+ }
126
+
127
+ {% endjavascript %}
0 commit comments