diff --git a/_basics/operators.md b/_basics/operators.md index 1e0a414..0f945cf 100644 --- a/_basics/operators.md +++ b/_basics/operators.md @@ -70,7 +70,7 @@ You can use multiple operators in a tag: ```liquid {% raw %} -{% if product.title contains 'Pack' %} +{% if product.title contains "Pack" %} This product's title contains the word Pack. {% endif %} {% endraw %} @@ -80,8 +80,8 @@ You can use multiple operators in a tag: ```liquid {% raw %} -{% if product.tags contains 'Hello' %} - This product has been tagged with 'Hello'. +{% if product.tags contains "Hello" %} + This product has been tagged with "Hello". {% endif %} {% endraw %} ``` @@ -95,7 +95,7 @@ In tags with more than one `and` or `or` operator, operators are checked in orde ```liquid {% raw %} {% if true or false and false %} - This evaluates to true, since the 'and' condition is checked first. + This evaluates to true, since the `and` condition is checked first. {% endif %} {% endraw %} ``` diff --git a/_filters/compact.md b/_filters/compact.md index 66333be..2847104 100644 --- a/_filters/compact.md +++ b/_filters/compact.md @@ -10,7 +10,7 @@ For this example, assume `site.pages` is an array of content pages for a website
Input
```liquid {% raw %} -{% assign site_categories = site.pages | map: 'category' %} +{% assign site_categories = site.pages | map: "category" %} {% for category in site_categories %} - {{ category }} @@ -34,7 +34,7 @@ By using `compact` when we create our `site_categories` array, we can remove allInput
```liquid {% raw %} -{% assign site_categories = site.pages | map: 'category' | compact %} +{% assign site_categories = site.pages | map: "category" | compact %} {% for category in site_categories %} - {{ category }} diff --git a/_tags/control-flow.md b/_tags/control-flow.md index 505f1bd..83f30fc 100644 --- a/_tags/control-flow.md +++ b/_tags/control-flow.md @@ -13,7 +13,7 @@ Executes a block of code only if a certain condition is `true`.Input
```liquid {% raw %} -{% if product.title == 'Awesome Shoes' %} +{% if product.title == "Awesome Shoes" %} These shoes are awesome! {% endif %} {% endraw %} @@ -31,7 +31,7 @@ The opposite of `if` – executes a block of code only if a certain condition isInput
```liquid {% raw %} -{% unless product.title == 'Awesome Shoes' %} +{% unless product.title == "Awesome Shoes" %} These shoes are not awesome. {% endunless %} {% endraw %} @@ -46,7 +46,7 @@ This would be the equivalent of doing the following: ```liquid {% raw %} -{% if product.title != 'Awesome Shoes' %} +{% if product.title != "Awesome Shoes" %} These shoes are not awesome. {% endif %} {% endraw %} @@ -59,10 +59,10 @@ Adds more conditions within an `if` or `unless` block.Input
```liquid {% raw %} - -{% if customer.name == 'kevin' %} + +{% if customer.name == "kevin" %} Hey Kevin! -{% elsif customer.name == 'anonymous' %} +{% elsif customer.name == "anonymous" %} Hey Anonymous! {% else %} Hi Stranger! @@ -82,11 +82,11 @@ Creates a switch statement to compare a variable with different values. `case` iInput
```liquid {% raw %} -{% assign handle = 'cake' %} +{% assign handle = "cake" %} {% case handle %} - {% when 'cake' %} + {% when "cake" %} This is a cake - {% when 'cookie' %} + {% when "cookie" %} This is a cookie {% else %} This is not a cake nor a cookie diff --git a/_tags/iteration.md b/_tags/iteration.md index 97a0b2b..1f47092 100644 --- a/_tags/iteration.md +++ b/_tags/iteration.md @@ -1,6 +1,6 @@ --- title: Iteration -description: An overview of iteration or 'loop' tags in the Liquid template language. +description: An overview of iteration or "loop" tags in the Liquid template language. --- Iteration tags run blocks of code repeatedly. @@ -179,10 +179,10 @@ Loops through a group of strings and outputs them in the order that they were paInput
```liquid {% raw %} -{% cycle 'one', 'two', 'three' %} -{% cycle 'one', 'two', 'three' %} -{% cycle 'one', 'two', 'three' %} -{% cycle 'one', 'two', 'three' %} +{% cycle "one", "two", "three" %} +{% cycle "one", "two", "three" %} +{% cycle "one", "two", "three" %} +{% cycle "one", "two", "three" %} {% endraw %} ``` diff --git a/_tags/variable.md b/_tags/variable.md index 6bc26a7..d99c314 100644 --- a/_tags/variable.md +++ b/_tags/variable.md @@ -61,7 +61,7 @@ Using `capture`, you can create complex strings using other variables created wiInput
```liquid {% raw %} -{% assign favorite_food = 'pizza' %} +{% assign favorite_food = "pizza" %} {% assign age = 35 %} {% capture about_me %}