diff --git a/index.md b/index.md index 1ef72a3..1cf1975 100644 --- a/index.md +++ b/index.md @@ -1,5 +1,6 @@ --- layout: default +description: Documentation for the Liquid template language, created by Shopify. --- {% include home-banner.html %} diff --git a/tags/_theme.md b/tags/_theme.md deleted file mode 100644 index 812ace5..0000000 --- a/tags/_theme.md +++ /dev/null @@ -1,238 +0,0 @@ ---- -title: Theme ---- - - -Theme Tags have various functions, including: - -- Outputting template-specific HTML markup -- Telling the theme which layout and snippets to use -- Splitting a returned array into multiple pages. - - -### comment - -
Allows you to leave un-rendered code inside a Liquid template. Any text within the opening and closing comment blocks will not be output, and any Liquid code within will not be executed.
with parameter assigns a value to a variable inside a snippet that shares the same name as the snippet.
-
-For example, we can have a snippet named **color.liquid** which contains the following:
-
-{% highlight html %}{% raw %}
-color: '{{ color }}'
-shape: '{{ shape }}'
-{% endraw %}{% endhighlight %}
-
-Within **theme.liquid**, we can include the **color.liquid** snippet as follows:
-
-{% highlight html %}{% raw %}
-{% assign shape = 'circle' %}
-{% include 'color' %}
-{% include 'color' with 'red' %}
-{% include 'color' with 'blue' %}
-{% assign shape = 'square' %}
-{% include 'color' with 'red' %}
-{% endraw %}{% endhighlight %}
-
-The output will be:
-
-{% highlight html %}{% raw %}
-color: shape: 'circle'
-color: 'red' shape: 'circle'
-color: 'blue' shape: 'circle'
-color: 'red' shape: 'square'
-{% endraw %}{% endhighlight %}
-
-### form
-
-Creates an HTML <form> element with all the necessary attributes (action, id, etc.) and <input> to submit the form successfully.
-
-article object as a parameter.
-
-Input
-Output
-none.
-
-{% highlight html %}{% raw %}
-{% layout none %}
-{% endraw %}{% endhighlight %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-### paginate
-
-Splitting products, blog articles, and search results across multiple pages is a necessary component of theme design as you are limited to 50 results per page in any for loop.
-
-The paginate tag works in conjunction with the for tag to split content into numerous pages. It must wrap a for tag block that loops through an array, as shown in the example below:
-
-{% highlight html %}{% raw %}
-{% paginate collection.products by 5 %}
- {% for product in collection.products %}
-
- {% endfor %}
-{% endpaginate %}
-{% endraw %}{% endhighlight %}
-
-The by parameter is followed by an integer between 1 and 50 that tells the paginate tag how many results it should output per page.
-
-
-Within paginate tags, you can access attributes of the paginate object. This includes the attributes to output the links required to navigate within the generated pages.
-
-
-{% comment %}
-
-Accessing any attributes of the array you are paginating before the opening paginate tag will cause errors. To avoid this, make sure any variables
-
-
-**Bad Example**
-Allows output of Liquid code on a page without being parsed.
- -Input
- -{% raw %}{{ 5 | plus: 6 }}{% endraw %} is equal to 11.Output
- -{{ 5 | plus: 6 }} is equal to 11.