diff --git a/basics/introduction.md b/basics/introduction.md
index ba21eee1..23b84c58 100644
--- a/basics/introduction.md
+++ b/basics/introduction.md
@@ -2,7 +2,7 @@
title: Introduction
---
-Liquid code can be categorized into three parts: **objects**, **tags**, and **filters**.
+Liquid code can be categorized into [**objects**](#objects), [**tags**](#tags), and [**filters**](#filters).
## Objects
@@ -23,9 +23,9 @@ In this case, Liquid is rendering the content of an object called `page.title`,
## Tags
-**Tags** create the logic and control flow for your templates. They are denoted by curly braces and percent signs: `{% raw %}{%{% endraw %}` and `{% raw %}%}{% endraw %}`.
+**Tags** create the logic and control flow for templates. They are denoted by curly braces and percent signs: `{% raw %}{%{% endraw %}` and `{% raw %}%}{% endraw %}`.
-Tag markup does not resolve to text. This means that you can assign variables and create conditionals and loops without showing any of the Liquid logic on the page.
+The markup used in tags does not produce any visible text. This means that you can assign variables and create conditions and loops without showing any of the Liquid logic on the page.
```liquid
{% raw %}
@@ -51,7 +51,7 @@ You can read more about each type of tag in their respective sections.
## Filters
-**Filters** modify the output of a Liquid object. They are using within an output and are separated by a `|`.
+**Filters** change the output of a Liquid object. They are using within an output and are separated by a `|`.
```liquid
{% raw %}
diff --git a/basics/operators.md b/basics/operators.md
index e3d7cc01..522805be 100644
--- a/basics/operators.md
+++ b/basics/operators.md
@@ -4,7 +4,7 @@ title: Operators
Liquid includes many logical and comparison operators.
-## Basic Operators
+## Basic operators
diff --git a/basics/truthy-and-falsy.md b/basics/truthy-and-falsy.md
index feda346c..c760a6a3 100644
--- a/basics/truthy-and-falsy.md
+++ b/basics/truthy-and-falsy.md
@@ -12,11 +12,11 @@ In programming, anything that returns `true` in a conditional is called **truthy
All values in Liquid are truthy except `nil` and `false`.
-In the example below, the text "Tobi" is not a boolean, but it is truthy in a conditional:
+In the example below, the string "Tobi" is not a boolean, but it is truthy in a conditional:
```liquid
{% raw %}
-{% assign tobi = 'Tobi' %}
+{% assign tobi = "Tobi" %}
{% if tobi == true %}
This condition will always be true.
@@ -38,7 +38,7 @@ In the example below, the text "Tobi" is not a boolean, but it is truthy in a co
```
-[EmptyDrops](/basics/types/#emptydrop) are also truthy. In the example below, if `settings.page` is an empty string or set to a hidden or deleted object, you will end up with an EmptyDrop. The result is an empty div:
+[EmptyDrops](/basics/types/#emptydrop) are also truthy. In the example below, if `settings.page` is an empty string or set to a hidden or deleted object, you will end up with an EmptyDrop. The result is an empty `div`:
```liquid
{% raw %}
@@ -54,7 +54,7 @@ In the example below, the text "Tobi" is not a boolean, but it is truthy in a co
## Falsy
-The falsy values in Liquid are [nil](/basics/types/#nil) and [false](/basics/types/#boolean).
+The falsy values in Liquid are [`nil`](/basics/types/#nil) and [`false`](/basics/types/#boolean).
## Summary
diff --git a/basics/types.md b/basics/types.md
index b12a9aa6..f4f58257 100644
--- a/basics/types.md
+++ b/basics/types.md
@@ -11,11 +11,11 @@ Liquid objects can have one of six types:
- [Array](#array)
- [EmptyDrop](#emptydrop)
-Liquid variables can be initialized by using the [assign](/tags/#assign) or [capture](/tags/#capture) tags.
+You can initialize Liquid variables with the [assign](/tags/#assign) or [capture](/tags/#capture) tags.
## String
-Strings are declared by wrapping a variable's value in single or double quotes.
+Declare a string by wrapping a variable's value in single or double quotes:
```liquid
{% raw %}
@@ -25,7 +25,7 @@ Strings are declared by wrapping a variable's value in single or double quotes.
## Number
-Numbers include floats and integers.
+Numbers include floats and integers:
```liquid
{% raw %}
@@ -36,7 +36,7 @@ Numbers include floats and integers.
## Boolean
-Booleans are either `true` or `false`. No quotations are necessary when declaring a boolean.
+Booleans are either `true` or `false`. No quotations are necessary when declaring a boolean:
```liquid
{% raw %}
@@ -49,7 +49,7 @@ Booleans are either `true` or `false`. No quotations are necessary when declarin
Nil is a special empty value that is returned when Liquid code has no results. It is **not** a string with the characters "nil".
-Nil is treated as false in the conditions of `if` blocks and other Liquid tags that check the truthfulness of a statement.
+Nil is [treated as false](/basics/truthy-and-falsy) in the conditions of `if` blocks and other Liquid tags that check the truthfulness of a statement.
In the following example, if the user does not exist (that is, `user` returns `nil`), Liquid will not print the greeting:
@@ -79,7 +79,7 @@ Arrays hold lists of variables of any type.
### Accessing items in arrays
-To access all of the items in an array, you can loop through each item in the array using an [iteration tag](/tags/iteration/).
+To access all the items in an array, you can loop through each item in the array using an [iteration tag](/tags/iteration/).
```liquid
{% raw %}
@@ -117,13 +117,13 @@ Adam
### Initializing arrays
-You cannot initialize arrays using pure Liquid.
+You cannot initialize arrays using only Liquid.
-You can, however, use the [split](/filters/split) filter to break a single string into an array of substrings.
+You can, however, use the [split](/filters/split) filter to break a string into an array of substrings.
## EmptyDrop
-An EmptyDrop object is returned if you try to access a deleted object (such as a page or post) by its handle. In the example below, `page_1`, `page_2` and `page_3` are all EmptyDrop objects.
+An EmptyDrop object is returned if you try to access a deleted object by name. In the example below, `page_1`, `page_2` and `page_3` are all EmptyDrop objects.
```liquid
{% raw %}
@@ -136,7 +136,7 @@ An EmptyDrop object is returned if you try to access a deleted object (such as a
EmptyDrop objects only have one attribute, `empty?`, which is always *true*.
-Collections and pages that *do* exist do not have an `empty?` attribute. Their `empty?` is “falsy”, which means that calling it inside an if statement will return *false*. When using an unless statement on existing collections and pages, `empty?` will return `true`.
+Collections and pages that *do* exist do not have an `empty?` attribute. Their `empty?` is "falsy", which means that calling it inside an if statement will return *false*. When using an `unless` statement on existing collections and pages, `empty?` will return `true`.
### Checking for emptiness
@@ -152,7 +152,7 @@ Using the `empty?` attribute, you can check to see if an object exists or not be
{% endraw %}
```
-If you don't check for emptiness first, Liquid may print empty HTML elements to the page:
+If you don't check for emptiness first, Liquid might print empty HTML elements to the page:
```html
diff --git a/filters/capitalize.md b/filters/capitalize.md
index 1eaf8ec2..ef9ecbea 100644
--- a/filters/capitalize.md
+++ b/filters/capitalize.md
@@ -14,7 +14,7 @@ Makes the first character of a string capitalized.
Title
```
-`capitalize` only capitalizes the first character of the string, so subsequent words are not affected:
+`capitalize` only capitalizes the first character of the string, so later words are not affected:
```liquid
{% raw %}
diff --git a/filters/ceil.md b/filters/ceil.md
index 1f077410..f2976514 100644
--- a/filters/ceil.md
+++ b/filters/ceil.md
@@ -2,7 +2,7 @@
title: ceil
---
-`ceil` rounds the input up to the nearest whole number. The filter will attempt to cast any input to a number before it is applied.
+Rounds the input up to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
```liquid
{% raw %}
@@ -11,7 +11,7 @@ title: ceil
```
```text
-2
+{{ 1.2 | ceil }}
```
```liquid
@@ -21,7 +21,7 @@ title: ceil
```
```text
-2
+{{ 2.0 | ceil }}
```
```liquid
@@ -31,5 +31,17 @@ title: ceil
```
```text
-184
+{{ 183.357 | ceil }}
+```
+
+Here the input value is a string:
+
+```liquid
+{% raw %}
+{{ "3.5" | ceil }}
+{% endraw %}
+```
+
+```text
+{{ "3.5" | ceil }}
```
diff --git a/filters/date.md b/filters/date.md
index 1d4274c7..4048def3 100644
--- a/filters/date.md
+++ b/filters/date.md
@@ -23,3 +23,15 @@ Fri, Jul 17, 15
```text
2015
```
+
+`date` works on strings if they contain well-formatted dates:
+
+```liquid
+{% raw %}
+{{ "March 14, 2016" | date: "%b %d, %y" }}
+{% endraw %}
+```
+
+```text
+{{ "March 14, 2016" | date: "%b %d, %y" }}
+```
diff --git a/filters/divided_by.md b/filters/divided_by.md
index defffa88..a455fd17 100644
--- a/filters/divided_by.md
+++ b/filters/divided_by.md
@@ -2,7 +2,7 @@
title: divided_by
---
-Divides a number by its argument.
+Divides a number by the specified number.
The result is rounded down to the nearest integer (that is, the [floor](/filters/floor)).
diff --git a/filters/floor.md b/filters/floor.md
index 7bf17244..306ae15a 100644
--- a/filters/floor.md
+++ b/filters/floor.md
@@ -2,7 +2,7 @@
title: floor
---
-Rounds a number down to the nearest whole number.
+Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
```liquid
{% raw %}
@@ -33,3 +33,15 @@ Rounds a number down to the nearest whole number.
```text
{{ 183.357 | floor }}
```
+
+Here the input value is a string:
+
+```liquid
+{% raw %}
+{{ "3.5" | floor }}
+{% endraw %}
+```
+
+```text
+{{ "3.5" | floor }}
+```
diff --git a/filters/lstrip.md b/filters/lstrip.md
index 4693fc65..72db9aba 100644
--- a/filters/lstrip.md
+++ b/filters/lstrip.md
@@ -2,7 +2,7 @@
title: lstrip
---
-Removes all whitespaces (tabs, spaces, and newlines) from a string.
+Removes all whitespaces (tabs, spaces, and newlines) from the beginning of a string. The filter does not affect spaces between words.
```liquid
{% raw %}
diff --git a/filters/plus.md b/filters/plus.md
index 223a3cd5..617a855f 100644
--- a/filters/plus.md
+++ b/filters/plus.md
@@ -2,7 +2,7 @@
title: plus
---
-Adds a number with another number.
+Adds a number to another number.
```liquid
{% raw %}
diff --git a/filters/prepend.md b/filters/prepend.md
index efbd5a89..2702edbb 100644
--- a/filters/prepend.md
+++ b/filters/prepend.md
@@ -2,7 +2,7 @@
title: prepend
---
-Concatenates a string to the beginning of a string.
+Adds the specified string to the beginning of another string.
```liquid
{% raw %}
diff --git a/filters/remove.md b/filters/remove.md
index 948d0dc4..6e9f6952 100644
--- a/filters/remove.md
+++ b/filters/remove.md
@@ -2,7 +2,7 @@
title: remove
---
-Removes every occurrence of an argument from a string.
+Removes every occurrence of the specified substring from a string.
```liquid
{% raw %}
diff --git a/filters/remove_first.md b/filters/remove_first.md
index 59b1fe9f..3b7157db 100644
--- a/filters/remove_first.md
+++ b/filters/remove_first.md
@@ -2,7 +2,7 @@
title: remove_first
---
-Removes only the first occurrence of an argument from a string.
+Removes only the first occurrence of the specified substring from a string.
```liquid
{% raw %}
diff --git a/filters/replace_first.md b/filters/replace_first.md
index 928c2bc2..b8056cc1 100644
--- a/filters/replace_first.md
+++ b/filters/replace_first.md
@@ -2,14 +2,16 @@
title: replace_first
---
-Replaces only the first occurrence of an argument in a string with the second argument.
+Replaces only the first occurrence of the first argument in a string with the second argument.
```liquid
{% raw %}
-{{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}
+{% assign my_string = "Take my protein pills and put my helmet on" %}
+{{ my_string | replace_first: "my", "your" }}
{% endraw %}
```
```text
-{{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}
+{% assign my_string = "Take my protein pills and put my helmet on" %}
+{{ my_string | replace_first: "my", "your" }}
```
diff --git a/filters/strip_html.md b/filters/strip_html.md
index e44feeef..b41eafd5 100644
--- a/filters/strip_html.md
+++ b/filters/strip_html.md
@@ -4,13 +4,12 @@ title: strip_html
Removes any HTML tags from a string.
-
```liquid
{% raw %}
-{{ "Have you read James & the Giant Peach?" | strip_html }}
+{{ "Have you read Ulysses?" | strip_html }}
{% endraw %}
```
```text
-{{ "Have you read James & the Giant Peach?" | strip_html }}
+{{ "Have you read Ulysses?" | strip_html }}
```
diff --git a/filters/truncatewords.md b/filters/truncatewords.md
index e2324282..c9ee8492 100644
--- a/filters/truncatewords.md
+++ b/filters/truncatewords.md
@@ -2,7 +2,7 @@
title: truncatewords
---
-Shortens a string down to the number of words passed as the argument. If the number of words specified is less than the number of words in the string, an ellipsis (...) is appended to the string.
+Shortens a string down to the number of words passed as the argument. If the specified number of words is less than the number of words in the string, an ellipsis (...) is appended to the string.
```liquid
{% raw %}
diff --git a/filters/uniq.md b/filters/uniq.md
index 751d88a2..7ff73b96 100644
--- a/filters/uniq.md
+++ b/filters/uniq.md
@@ -6,14 +6,14 @@ Removes any duplicate elements in an array.
```liquid
{% raw %}
-{% assign my_array = "apples, oranges, bananas, oranges, apples" | split: ", " %}
+{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }}
{% endraw %}
```
```text
-{% assign my_array = "apples, oranges, bananas, oranges, apples" | split: ", " %}
+{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }}
```
diff --git a/tags/control-flow.md b/tags/control-flow.md
index d7c4c01e..976e6632 100644
--- a/tags/control-flow.md
+++ b/tags/control-flow.md
@@ -28,7 +28,7 @@ This is a cake
## if
-Executes a block of code only if a certain condition is met.
+Executes a block of code only if a certain condition is `true`.
```liquid
{% raw %}
@@ -42,30 +42,9 @@ Executes a block of code only if a certain condition is met.
These shoes are awesome!
```
-## elsif / else
-
-Adds more conditions within an `if` or `unless` block.
-
-```liquid
-{% raw %}
-
-{% if customer.name == 'kevin' %}
- Hey Kevin!
-{% elsif customer.name == 'anonymous' %}
- Hey Anonymous!
-{% else %}
- Hi Stranger!
-{% endif %}
-{% endraw %}
-```
-
-```text
-Hey Anonymous!
-```
-
## unless
-Similar to `if`, but executes a block of code only if a certain condition is **not** met.
+The opposite of `if` – executes a block of code only if a certain condition is **not** met.
```liquid
{% raw %}
@@ -88,3 +67,24 @@ This would be the equivalent of doing the following:
{% endif %}
{% endraw %}
```
+
+## elsif / else
+
+Adds more conditions within an `if` or `unless` block.
+
+```liquid
+{% raw %}
+
+{% if customer.name == 'kevin' %}
+ Hey Kevin!
+{% elsif customer.name == 'anonymous' %}
+ Hey Anonymous!
+{% else %}
+ Hi Stranger!
+{% endif %}
+{% endraw %}
+```
+
+```text
+Hey Anonymous!
+```
diff --git a/tags/iteration.md b/tags/iteration.md
index 9648c136..fbc7902e 100644
--- a/tags/iteration.md
+++ b/tags/iteration.md
@@ -2,13 +2,11 @@
title: Iteration
---
-Iteration Tags are used to run a block of code repeatedly.
+Iteration tags run blocks of code repeatedly.
## for
-Repeatedly executes a block of code. For a full list of attributes available within a `for` loop, see [forloop (object)](/themes/liquid-documentation/objects/for-loops).
-
-`for` loops can output a maximum of 50 results per page. In cases where there are more than 50 results, use the [paginate](/themes/liquid-documentation/tags/theme-tags/#paginate) tag to split them across multiple pages.
+Repeatedly executes a block of code. For a full list of attributes available within a `for` loop, see [forloop (object)](https://docs.shopify.com/themes/liquid/objects/for-loops).
```liquid
{% raw %}
@@ -66,7 +64,7 @@ Causes the loop to skip the current iteration when it encounters the `continue`
### limit
-Exits the for loop at a specific index.
+Limits the loop to the specified number of iterations.
```liquid
{% raw %}
@@ -83,7 +81,7 @@ Exits the for loop at a specific index.
### offset
-Starts the for loop at a specific index.
+Begins the loop at the specified index.
```liquid
{% raw %}
@@ -103,26 +101,26 @@ Starts the for loop at a specific index.
Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.
```liquid
-{% raw %}
-{% assign num = 4 %}
-{% for i in (1..num) %}
+{% for i in (3..5) %}
{{ i }}
{% endfor %}
-{% for i in (3..5) %}
+{% raw %}
+{% assign num = 4 %}
+{% for i in (1..num) %}
{{ i }}
{% endfor %}
{% endraw %}
```
```text
-1 2 3 4
3 4 5
+1 2 3 4
```
### reversed
-Reverses the order of the for loop.
+Reverses the order of the loop.
```liquid
{% raw %}
@@ -209,7 +207,7 @@ Generates an HTML table. Must be wrapped in opening `` and closing `
|
Bullseye Shirt
- |
+
|
- Another Classic Vinyl
- |
+ Another Classic Vinyl
+
- Awesome Jeans
- |
+ Awesome Jeans
+
```
@@ -262,7 +260,7 @@ Exits the tablerow after a specific index.
{% endraw %}
```
-#### offset
+### offset
Starts the tablerow after a specific index.
@@ -274,7 +272,7 @@ Starts the tablerow after a specific index.
{% endraw %}
```
-#### range
+### range
Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.
diff --git a/tags/variable.md b/tags/variable.md
index 1fad57b1..618e02b9 100644
--- a/tags/variable.md
+++ b/tags/variable.md
@@ -10,18 +10,18 @@ Creates a new variable.
```liquid
{% raw %}
- {% assign my_variable = false %}
- {% if my_variable != true %}
+{% assign my_variable = false %}
+{% if my_variable != true %}
This statement is valid.
- {% endif %}
+{% endif %}
{% endraw %}
```
```text
- This statement is valid.
+ This statement is valid.
```
-Use quotations ("") to save the variable as a string.
+Wrap a variable in quotations `"` to save it as a string.
```liquid
{% raw %}
@@ -55,9 +55,9 @@ Creates a new number variable, and increases its value by one every time it is c
```liquid
{% raw %}
-{% increment variable %}
-{% increment variable %}
-{% increment variable %}
+{% increment my_counter %}
+{% increment my_counter %}
+{% increment my_counter %}
{% endraw %}
```
@@ -69,7 +69,7 @@ Creates a new number variable, and increases its value by one every time it is c
Variables created through the `increment` tag are independent from variables created through `assign` or `capture`.
-In the example below, a variable named "var" is created through `assign`. The `increment` tag is then used several times on a variable with the same name. However, note that the `increment` tag does not affect the value of "var" that was created through `assign`.
+In the example below, a variable named "var" is created through `assign`. The `increment` tag is then used several times on a variable with the same name. Note that the `increment` tag does not affect the value of "var" that was created through `assign`.
```liquid
{% raw %}