There is no need to pass parse options to the BlockBody initializer, since
it does all the parsing in the parse method, unlike tags which parse the
tag markup in the initializer.
Add a simple profiling system to liquid rendering. Each
liquid tag ({{ }} and {% %}) is processed through this profiling,
keeping track of the partial name (in the case of {% include %}), line
number, and the time it took to render the tag. In the case of {%
include %}, the profiler keeps track of the name of the partial and
properly links back tag rendering to the partial and line number for
easy lookup and dive down. With this, it's now possible to track down
exactly how long each tag takes to render.
These hooks get installed and uninstalled on an as-need basis so by
default there is no impact on the overall liquid execution speed.
Three tests in the test suite use the Liquid::Template.register_filter
function to register custom filters with Liquid::Strainer. The problem
is that these register_filter calls leave the Liquid::Strainer object in
an altered state.
As an example, the FiltersTest's test_local_filter relies on the default
behavior of Liquid::Strainer operator, and the test was failing if
register_function had been called earlier. The same thing was happening
with FiltersInTemplate's test_local_global.
The problem was present when the Filters test classes were loaded inside
a single ruby process that also loaded HashOrderingTest. One example is
"rake test", which runs "require" on every test file. Another basic
example is the following command:
ruby -Itest -e "require 'integration/hash_ordering_test';
require 'integration/filter_test'"
Update the tests to always reset Liquid::Strainer's filters back to the
default list of filters.
With this change, FiltersTest and FiltersInTemplate now pass.
Two tests in IfElseTagTest each set a custom operator function for the
"contains" comparison operator.
The problem is that IfElseTagTest was clobbering the original operator
in Liquid and leaving it in an altered state.
As an example, ConditionUnitTest's test_contains_works_on_arrays relies
on the specific behavior of the "contains" operator, and its
test_contains_works_on_arrays was failing.
The problem was present when both test classes were require'd inside a
single ruby process. One example is "rake test", which runs "require" on
every test file. Another basic example is the following command:
ruby -Itest -e "require 'integration/tags/if_else_tag_test.rb';
require 'unit/condition_unit_test.rb'"
This would cause test_contains_works_on_arrays to fail.
Update IfElseTagTest to avoid clobbering the "contains" operator.
With this change, ConditionUnitTest's test_contains_works_on_arrays now
passes.
Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5,
the shim has broken some compatibility with Test::Unit::TestCase in some
scenarios.
Adjusts the test suite to support Minitest 5's syntax.
Minitest versions 4 and below do not support the newer Minitest::Test
class that arrived in version 5. For that case, use the
MiniTest::Unit::TestCase class as a fallback
Conflicts:
test/integration/tags/for_tag_test.rb
test/test_helper.rb
Because Liquid keeps a reference to tag classes, Rails class reloading may
cause problems with custom tags. This commit introduces a setting that
allows these classes to be resolved when required.
Update the URL of the docs badge to include it from inch-ci.org instead of inch-pages.github.io (the former being the successor of the Inch Pages project).
[ci skip]
Condition now raises ::ArgumentError when built wrongly.
This patch make it raise Liquid::ArgumentError instead
to indicate a liquid markup error instead of ruby error.
Added '%s' - Number of seconds since 1970-01-01 00:00:00 UTC to included list of flags
Added link to Ruby docs on Time#strftime() to allow easier discovery of unlisted filter options.
That pull request broke raw tags with open variable tags. E.g.
{% raw %}
{{
{% endraw %}
{{ 1 }}
This reverts commit fbaabf3b59, reversing
changes made to af24d2c2ab.
* Strainer has a class cache that creates Strainer subclasses for each filter
set that is used on .create calls.
* Context now creates a list of filters and passes this to Strainer.create to
utilize the class cache in almost all use cases.
* If add_filter was called after a render, then the method cache may still be
invalidated.
Conflicts:
lib/liquid/strainer.rb
1.8.7 compatibility fix
In Ruby 1.8.7, Hash does not preserve insertion ordering as Array does.
This could cause a problem when registering filters which depend on others and
the registration order is important.
So, the @@filters variable was changed to array where the order of the filters is
the same as the insertion order.
After moving the method existence check from Context into Strainer,
updated Strainer to only accept invokation methods that were added via
filter Modules, and done in a way that respond_to? is never called,
preventing unconstrained Symbol table growth.
Class.public_method_defined? ends up diving into Ruby's core looking for
a method with the given method_or_key. This process at some point turns
method_or_key into a Symbol. This change no longer takes that path and
thus doesn't grow the Symbol table.
The regex was using \S+ to match the comma between the filters
arguments, but would continue to match idependent quote characters and
filter separators. This can result in multiple filters being interpreted as
a single one with many arguments.
When a continue or break statement is executed it pushes an interrupt to a
stack in context. If any non-handled interrupts are present blocks will cease
to execute. The for loop can handle the most recent interrupt in the stack.
I had accidentally read slice_collection_using_each as using to as an
inclusive limit rather than exclusive, and no tests covered the offset or
limit parameters.
* 'master' of git://github.com/Shopify/liquid:
* Seperated 'Howto' into 'How to'. * Added periods to the second list as the first item has them. I guess I'm anally retentive like that. :)
Fix conditions using negative number comparisons
A simple attempt, but basically it shifts the parsing of the right hand side of the assign from a simple context lookup to using the Variable parser (that includes filters). Fixes#79.
Portions of the code examples were not being rendered as code because they lacked a leading tab. Also, a missing period on the first sentence made the first paragraph confusing.
Thanks to phaer: https://gist.github.com/1020852
YO DAWG, WE HEARD YOU LIKE LIQUID
SO WE PUT A RAW TAG IN YOUR LIQUID
SO YOU CAN HAVE LIQUID IN YOUR LIQUID
- regexp engines are different from 1.8 to 1.9, fixed the literal shorthand regexp accordingly
- changed the shorthand regexp text from a match to a string scan
- test_helper now loads rubygems unless RUBY_VERSION is > 1.9
- added test to assert that conditions can contain conditions within its value (eg 'a-and-b')
Tags
- indented the if tag
Tests
- added ruby-debug to the test_helper
- indented some tests
- added test that asserts nonexistent filters are ignored
Liquid
- Bill's mind blowing liquid patch to support filter separators (|) in quoted strings (svn r7516).
- This is a consolidation effort based on newrelic's liquid fork commit 88a5b891d009054d56b994c9448725c74e2b1e13
Using an attribute should only cause the corresponding method to be invoked
once. Replacing a lambda with its return value should work for arrays.
Array index syntax shouldn't allow calls to special methods.
* Features which are likely to be useful to the majority of Liquid users
## Things we won't merge
* Code which introduces considerable performance degrations
* Code which touches performance critical parts of Liquid and comes without benchmarks
* Features which are not important for most people (we want to keep the core Liquid code small and tidy)
* Features which can easily be implemented on top of Liquid (for example as a custom filter or custom filesystem)
* Code which comes without tests
* Code which breaks existing tests
## Workflow
* Fork the Liquid repository
* Create a new branch in your fork
* If it makes sense, add tests for your code and run a performance benchmark
* Make sure all tests pass
* Create a pull request
* In the description, ping one of [@boourns](https://github.com/boourns), [@fw42](https://github.com/fw42), [@camilo](https://github.com/camilo), [@dylanahsmith](https://github.com/dylanahsmith), or [@arthurnn](https://github.com/arthurnn) and ask for a code review.
Yanked from rubygems, as it contained too many changes that broke compatibility. Those changes will be on following major releases.
## 2.5.1 / 2013-07-24
*#230: Fix security issue with map filter, Use invoke_drop in map filter [Florian Weingarten, fw42]
## 2.5.0 / 2013-03-06
* Prevent Object methods from being called on drops
* Avoid symbol injection from liquid
* Added break and continue statements
* Fix filter parser for args without space separators
* Add support for filter keyword arguments
## 2.4.0 / 2012-08-03
* Performance improvements
* Allow filters in `assign`
* Add `modulo` filter
* Ruby 1.8, 1.9, and Rubinius compatibility fixes
* Add support for `quoted['references']` in `tablerow`
* Add support for Enumerable to `tablerow`
*`strip_html` filter removes html comments
## 2.3.0 / 2011-10-16
* Several speed/memory improvements
* Numerous bug fixes
* Added support for MRI 1.9, Rubinius, and JRuby
* Added support for integer drop parameters
* Added epoch support to `date` filter
* New `raw` tag that suppresses parsing
* Added `else` option to `for` tag
* New `increment` tag
* New `split` filter
## 2.2.1 / 2010-08-23
* Added support for literal tags
## 2.2.0 / 2010-08-22
* Compatible with Ruby 1.8.7, 1.9.1 and 1.9.2-p0
* Merged some changed made by the community
## 1.9.0 / 2008-03-04
* Fixed gem install rake task
* Improve Error encapsulation in liquid by maintaining a own set of exceptions instead of relying on ruby build ins
## Before 1.9.0
* Added If with or / and expressions
* Implemented .to_liquid for all objects which can be passed to liquid like Strings Arrays Hashes Numerics and Booleans. To export new objects to liquid just implement .to_liquid on them and return objects which themselves have .to_liquid methods.
* Added more tags to standard library
* Added include tag ( like partials in rails )
* [...] Gazillion of detail improvements
* Added strainers as filter hosts for better security [Tobias Luetke]
* Fixed that rails integration would call filter with the wrong "self" [Michael Geary]
* Fixed bad error reporting when a filter called a method which doesn't exist. Liquid told you that it couldn't find the filter which was obviously misleading [Tobias Luetke]
* Removed count helper from standard lib. use size [Tobias Luetke]
* Fixed bug with string filter parameters failing to tolerate commas in strings. [Paul Hammond]
* Improved filter parameters. Filter parameters are now context sensitive; Types are resolved according to the rules of the context. Multiple parameters are now separated by the Liquid::ArgumentSeparator: , by default [Paul Hammond]
{{ 'Typo' | link_to: 'http://typo.leetsoft.com', 'Typo - a modern weblog engine' }}
* Added Liquid::Drop. A base class which you can use for exporting proxy objects to liquid which can acquire more data when used in liquid. [Tobias Luetke]
1. [Download and install Ruby](https://www.ruby-lang.org/en/downloads)
2. Download ZIP or clone in GitHub
3. Navigate to `liquid-gh-pages` folder or checkout `gh-pages` branch
4. Run `gem install bundler`
5. Run `bundle install`
6. Run `bundle exec jekyll serve`
7. Open [`http://127.0.0.1:4000/liquid/`](http://127.0.0.1:4000/liquid/) in your browser
* [Contributing guidelines](CONTRIBUTING.md)
* [Version history](History.md)
* [Liquid documentation from Shopify](http://docs.shopify.com/themes/liquid-basics)
* [Liquid Wiki at GitHub](https://github.com/Shopify/liquid/wiki)
* [Website](http://liquidmarkup.org/)
## Introduction
Liquid is a template engine which was written with very specific requirements:
* It has to have beautiful and simple markup. Template engines which don't produce good looking markup are no fun to use.
* It needs to be non evaling and secure. Liquid templates are made so that users can edit them. You don't want to run code on your server which your users wrote.
* It has to be stateless. Compile and render steps have to be separate so that the expensive parsing and compiling can be done once and later on you can just render it passing in a hash with local variables and objects.
## Why you should use Liquid
* You want to allow your users to edit the appearance of your application but don't want them to run **insecure code on your server**.
* You want to render templates directly from the database.
* You like smarty (PHP) style template engines.
* You need a template engine which does HTML just as well as emails.
* You don't like the markup of your current templating engine.
description:An overview of objects, tags, and filters in the Liquid template language.
redirect_from:/basics/
---
Liquid uses a combination of [**objects**](#objects), [**tags**](#tags), and [**filters**](#filters) inside **template files** to display dynamic content.
## Objects
**Objects** contain the content that Liquid displays on a page. Objects and variables are displayed when enclosed in double curly braces: `{% raw %}{{{% endraw %}` and `{% raw %}}}{% endraw %}`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ page.title }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ page.title }}
```
In this case, Liquid is rendering the content of the `title` property of the `page` object, which contains the text `{{ page.title }}`.
## Tags
**Tags** create the logic and control flow for templates. The curly brace percentage delimiters `{% raw %}{%{% endraw %}` and `{% raw %}%}{% endraw %}` and the text that they surround do not produce any visible output when the template is rendered. This lets you assign variables and create conditions or loops without showing any of the Liquid logic on the page.
You can read more about each type of tag in their respective sections.
## Filters
**Filters** change the output of a Liquid object or variable. They are used within double curly braces `{% raw %}{{ }}{% endraw %}` and [variable assignment]({{ "/tags/variable/" | prepend: site.baseurl }}), and are separated by a pipe character `|`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "/my/fancy/url" | append: ".html" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "/my/fancy/url" | append: ".html" }}
```
Multiple filters can be used on one output, and are applied from left to right.
description:Using operators to perform calculations in the Liquid template language.
---
Liquid includes many logical and comparison operators. You can use operators to create logic with [control flow]({{ "/tags/control-flow/" | prepend: site.baseurl }}) tags.
## Basic operators
<table>
<tbody>
<tr>
<td><code>==</code></td>
<td>equals</td>
</tr>
<tr>
<td><code>!=</code></td>
<td>does not equal</td>
</tr>
<tr>
<td><code>></code></td>
<td>greater than</td>
</tr>
<tr>
<td><code><</code></td>
<td>less than</td>
</tr>
<tr>
<td><code>>=</code></td>
<td>greater than or equal to</td>
</tr>
<tr>
<td><code><=</code></td>
<td>less than or equal to</td>
</tr>
<tr>
<td><code>or</code></td>
<td>logical or</td>
</tr>
<tr>
<td><code>and</code></td>
<td>logical and</td>
</tr>
</tbody>
</table>
For example:
```liquid
{%- raw -%}
{% if product.title == "Awesome Shoes" %}
These shoes are awesome!
{% endif %}
{% endraw %}
```
You can do multiple comparisons in a tag using the `and` and `or` operators:
```liquid
{%- raw -%}
{% if product.type == "Shirt" or product.type == "Shoes" %}
This is a shirt or a pair of shoes.
{% endif %}
{% endraw %}
```
## contains
`contains` checks for the presence of a substring inside a string.
```liquid
{%- raw -%}
{% if product.title contains "Pack" %}
This product's title contains the word Pack.
{% endif %}
{% endraw %}
```
`contains` can also check for the presence of a string in an array of strings.
```liquid
{%- raw -%}
{% if product.tags contains "Hello" %}
This product has been tagged with "Hello".
{% endif %}
{% endraw %}
```
`contains` can only search strings. You cannot use it to check for an object in an array of objects.
## Order of operations
In tags with more than one `and` or `or` operator, operators are checked in order *from right to left*. You cannot change the order of operations using parentheses — parentheses are invalid characters in Liquid and will prevent your tags from working.
```liquid
{%- raw -%}
{% if true or false and false %}
This evaluates to true, since the `and` condition is checked first.
{% endif %}
{% endraw %}
```
```liquid
{%- raw -%}
{% if true and false and false or true %}
This evaluates to false, since the tags are checked like this:
description:An overview of boolean logic in the Liquid template language.
---
When a non-boolean [data type]({{ "/basics/types/" | prepend: site.baseurl }}) is used in a boolean context (such as a conditional tag), Liquid decides whether to evaluate it as `true` or `false`. Data types that return `true` by default are called **truthy**. Data types that return false by default are called **falsy**.
## 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:
```liquid
{%- raw -%}
{% assign name = "Tobi" %}
{% if name %}
This text will always appear since "name" is defined.
{% endif %}
{% endraw %}
```
[Strings]({{ "/basics/types/#string" | prepend: site.baseurl }}), even when empty, are truthy. The example below will create empty HTML tags if `page.category` exists but is empty:
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% if page.category %}
<h1>{{ page.category }}</h1>
{% endif %}
{% endraw %}
```
<p class="code-label">Output</p>
```html
<h1></h1>
```
## Falsy
The only values that are falsy in Liquid are [`nil`]({{ "/basics/types/#nil" | prepend: site.baseurl }}) and [`false`]({{ "/basics/types/#boolean" | prepend: site.baseurl }}).
## Summary
The table below summarizes what is truthy or falsy in Liquid.
description:An overview of data types in the Liquid template language.
---
Liquid objects can be one of six types:
- [String](#string)
- [Number](#number)
- [Boolean](#boolean)
- [Nil](#nil)
- [Array](#array)
- [EmptyDrop](#emptydrop)
You can initialize Liquid variables using [`assign`]({{ "/tags/variable/#assign" | prepend: site.baseurl }}) or [`capture`]({{ "/tags/variable/#capture" | prepend: site.baseurl }}) tags.
## String
Strings are sequences of characters wrapped in single or double quotes:
```liquid
{%- raw -%}
{% assign my_string = "Hello World!" %}
{% endraw %}
```
Liquid does not convert escape sequences into special characters.
## Number
Numbers include floats and integers:
```liquid
{%- raw -%}
{% assign my_int = 25 %}
{% assign my_float = -39.756 %}
{% endraw %}
```
## Boolean
Booleans are either `true` or `false`. No quotations are necessary when declaring a boolean:
```liquid
{%- raw -%}
{% assign foo = true %}
{% assign bar = false %}
{% endraw %}
```
## Nil
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]({{ "/basics/truthy-and-falsy/#falsy" | prepend: site.baseurl }}) 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:
```liquid
{%- raw -%}
{% if user %}
Hello {{ user.name }}!
{% endif %}
{% endraw %}
```
Tags or outputs that return `nil` will not print anything to the page.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
The current user is {{ user.name }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
The current user is
```
## Array
Arrays hold lists of variables of any type.
### Accessing items in arrays
To access all the items in an array, you can loop through each item in the array using an [iteration tag]({{ "/tags/iteration/" | prepend: site.baseurl }}).
<p class="code-label">Input</p>
```liquid
{%- raw -%}
<!-- if site.users = "Tobi", "Laura", "Tetsuro", "Adam" -->
{% for user in site.users %}
{{ user }}
{% endfor %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
Tobi Laura Tetsuro Adam
```
### Accessing specific items in arrays
You can use square bracket `[``]` notation to access a specific item in an array. Array indexing starts at zero. A negative index will count from the end of the array.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
<!-- if site.users = "Tobi", "Laura", "Tetsuro", "Adam" -->
{{ site.users[0] }}
{{ site.users[1] }}
{{ site.users[-1] }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
Tobi
Laura
Adam
```
### Initializing arrays
You cannot initialize arrays using only Liquid.
You can, however, use the [`split`]({{ "/filters/split/" | prepend: site.baseurl }}) filter to break a string into an array of substrings.
## EmptyDrop
An EmptyDrop object is returned if you try to access a deleted object. In the example below, `page_1`, `page_2` and `page_3` are all EmptyDrop objects:
description:An overview of the different installations of Liquid and how Liquid can change depending on where you're using it.
---
Liquid is a flexible, safe language, and is used in many different environments. Liquid was created for use in [Shopify](https://www.shopify.com) stores, and is also used extensively on [Jekyll](https://jekyllrb.com) websites. Over time, both Shopify and Jekyll have added their own objects, tags, and filters to Liquid. The most popular versions of Liquid that exist are **Liquid**, **Shopify Liquid for themes**, and **Jekyll Liquid**.
This site documents the latest version of **Liquid** including betas and release candidates — that is, Liquid as it exists outside of Shopify and Jekyll. If you download the Liquid repository or install it as a [gem](https://rubygems.org/gems/liquid), you will get access to whatever objects, tags, and filters are in the version of Liquid that you chose.
## Shopify
Shopify always uses the latest version of Liquid as a base, but Shopify adds a significant number of objects, tags, and filters to Liquid for use in merchants' stores. These include objects representing store, product, and customer information, and filters for displaying store data and manipulating storefront assets like product images.
Shopify has several versions of Liquid. The most popular version is used to build Shopify themes. To learn about the Liquid elements that you can use to build Shopify themes, and to learn about the other versions of Liquid at Shopify, refer to the [Shopify Liquid reference](https://shopify.dev/api/liquid).
## Jekyll
[Jekyll](https://jekyllrb.com) is a static site generator, a command-line tool that creates websites by merging templates with content files. Jekyll uses Liquid as its template language, and adds a few objects, tags, and filters. These include objects representing content pages, tags for including snippets of content in others, and filters for manipulating strings and URLs.
Jekyll also powers [GitHub Pages](https://pages.github.com/), a web hosting service that lets you push a Jekyll installation to a GitHub repository and have the resulting website published. This website is built using GitHub Pages.
Jekyll might not be using the latest version of Liquid. This means that the tags and filters listed on this site may not work in Jekyll. Often the Jekyll project will wait for a stable release of Liquid rather than using a beta or release candidate version. To see which version of Liquid is being used by Jekyll or GitHub Pages, check the **runtime dependencies** section of the gem page for [Jekyll](https://rubygems.org/gems/jekyll) or [GitHub Pages](https://rubygems.org/gems/github-pages).
Jekyll's version of Liquid is documented in the [Liquid section of Jekyll's documentation](https://jekyllrb.com/docs/liquid/). If you want to try out Jekyll's version of Liquid, you can clone the Jekyll project or install Jekyll as a gem and test Liquid on a static site.
description:An overview of controlling whitespace between code in the Liquid template language.
---
In Liquid, you can include a hyphen in your tag syntax `{% raw %}{{-{% endraw %}`, `{% raw %}-}}{% endraw %}`, `{% raw %}{%-{% endraw %}`, and `{% raw %}-%}{% endraw %}` to strip whitespace from the left or right side of a rendered tag.
Normally, even if it doesn't print text, any line of Liquid in your template will still print a blank line in your rendered HTML:
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign my_variable = "tomato" %}
{{ my_variable }}
{% endraw %}
```
Notice the blank line before "tomato" in the rendered template:
<p class="code-label">Output</p>
```text
{% assign my_variable = "tomato" %}
{{ my_variable }}
```
By including a hyphen in your `assign` closing delimiter, you can strip the whitespace following it from the rendered template:
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign my_variable = "tomato" -%}
{{ my_variable }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% assign my_variable = "tomato" -%}
{{ my_variable }}
```
If you don't want any of your tags to print whitespace, as a general rule you can add hyphens to both sides of all your tags (`{% raw %}{%-{% endraw %}` and `{% raw %}-%}{% endraw %}`):
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign username = "John G. Chalmers-Smith" %}
{% if username and username.size > 10 %}
Wow, {{ username }} , you have a long name!
{% else %}
Hello there!
{% endif %}
{% endraw %}
```
<p class="code-label">Output without whitespace control</p>
```text
{% assign username = "John G. Chalmers-Smith" %}
{% if username and username.size > 10 %}
Wow, {{ username }} , you have a long name!
{% else %}
Hello there!
{% endif %}
```
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign username = "John G. Chalmers-Smith" -%}
{%- if username and username.size > 10 -%}
Wow, {{ username -}} , you have a long name!
{%- else -%}
Hello there!
{%- endif %}
{% endraw %}
```
<p class="code-label">Output with whitespace control</p>
description:Liquid is a template language and accompanying rendering engine. It is built for security, so is perfect for rendering custom templates from your users.
# Build settings
baseurl:/liquid# the subpath of your site, e.g. /blog/
url:https://shopify.github.io# the base hostname & protocol for your site
permalink:pretty
exclude:
- README.md
- CNAME
- Gemfile
- Gemfile.lock
- Gruntfile.js
- package.json
- package-lock.json
- node_modules
- vendor
- tags
keep_files:["css"]
# Collections
collections:
basics:
output:true
tags:
output:true
filters:
output:true
# Plugins
plugins:
- jekyll-redirect-from
# Front matter defaults
defaults:
- scope:
path:""# an empty string here means all files in the project
description:Liquid filter that removes nil values from an array.
version-badge:4.0.0
---
Removes any `nil` values from an array.
For this example, assume `site.pages` is an array of content pages for a website, and some of these pages have an attribute called `category` that specifies their content category. If we `map` those categories to an array, some of the array items might be `nil` if any pages do not have a `category` attribute.
description:Liquid filter that prints and formats dates.
---
Converts a timestamp into another date format. The format for this syntax is the same as [`strftime`](http://strftime.net). The input uses the same format as Ruby's [`Time.parse`](https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html#method-c-parse).
`date` works on strings if they contain well-formatted dates.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "March 14, 2016" | date: "%b %d, %y" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "March 14, 2016" | date: "%b %d, %y" }}
```
To get the current time, pass the special word `"now"` (or `"today"`) to `date`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.
{% endraw %}
```
<p class="code-label">Output</p>
```text
This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.
```
Note that the value will be the current time of when the page was last generated from the template, not when the page is presented to a user if caching or static site generation is involved.
description: Liquid filter that divides a number by another number.
---
Divides a number by another number.
The result is rounded down to the nearest integer (that is, the [floor]({{ "/filters/floor/" | prepend: site.baseurl }})) if the divisor is an integer.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ 16 | divided_by: 4 }}
{{ 5 | divided_by: 3 }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ 16 | divided_by: 4 }}
{{ 5 | divided_by: 3 }}
```
### Controlling rounding
`divided_by` produces a result of the same type as the divisor — that is, if you divide by an integer, the result will be an integer. If you divide by a float (a number with a decimal in it), the result will be a float.
For example, here the divisor is an integer:
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ 20 | divided_by: 7 }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ 20 | divided_by: 7 }}
```
Here it is a float:
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ 20 | divided_by: 7.0 }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ 20 | divided_by: 7.0 }}
```
### Changing variable types
You might want to use a variable as a divisor, in which case you can't simply add `.0` to convert it to a float. In these cases, you can `assign` a version of your variable converted to a float using the `times` filter.
In this example, we're dividing by a variable that contains an integer, so we get an integer:
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign my_integer = 7 %}
{{ 20 | divided_by: my_integer }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% assign my_integer = 7 %}
{{ 20 | divided_by: my_integer }}
```
Here, we [multiply]({{ "/filters/times/" | prepend: site.baseurl }}) the variable by `1.0` to get a float, then divide by the float instead:
description: Liquid filter that escapes URL-unsafe characters in a string.
---
Escapes a string by replacing characters with escape sequences (so that the string can be used in a URL, for example). It doesn't change strings that don't have anything to escape.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Have you read 'James & the Giant Peach'?" | escape }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Have you read 'James & the Giant Peach'?" | escape }}
description: Liquid filter that creates an array of values by extracting a named property from an object.
---
Creates an array of values by extracting the values of a named property from another object.
In this example, assume the object `site.pages` contains all the metadata for a website. Using `assign` with the `map` filter creates a variable that contains only the values of the `category` properties of everything in the `site.pages` object.
Although `reverse` cannot be used directly on a string, you can split a string into an array, reverse the array, and rejoin it by chaining together filters.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}
description: Liquid filter that returns a substring or item from a given position in a string or array.
---
Returns a substring of one character or series of array items beginning at the index specified by the first argument. An optional second argument specifies the length of the substring or number of array items to be returned.
String or array indices are numbered starting from 0.
description: Liquid filter that truncates a string to a given number of characters.
---
Shortens a string down to the number of characters passed as an argument. If the specified number of characters is less than the length of the string, an ellipsis (...) is appended to the string and is included in the character count.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | truncate: 20 }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | truncate: 20 }}
```
### Custom ellipsis
`truncate` takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (...), but you can specify a different sequence.
The length of the second argument counts against the number of characters specified by the first argument. For example, if you want to truncate a string to exactly 10 characters, and use a 3-character ellipsis, use **13** for the first argument of `truncate`, since the ellipsis counts as 3 characters.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}
```
### No ellipsis
You can truncate to the exact number of characters specified by the first argument and avoid showing trailing characters by passing a blank string as the second argument.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | truncate: 20, "" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | truncate: 20, "" }}
description: Liquid filter that truncates a string to a given number of words.
---
Shortens a string down to the number of words passed as an argument. If the specified number of words is less than the number of words in the string, an ellipsis (...) is appended to the string.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | truncatewords: 3 }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | truncatewords: 3 }}
```
### Custom ellipsis
`truncatewords` takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (...), but you can specify a different sequence.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
```
### No ellipsis
You can avoid showing trailing characters by passing a blank string as the second argument.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{{ "Ground control to Major Tom." | truncatewords: 3, "" }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{{ "Ground control to Major Tom." | truncatewords: 3, "" }}
description: Liquid filter that selects from arrays.
version-badge: 4.0.2
---
Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy/#truthy" | prepend: site.baseurl }}) value by default.
In this example, assume you have a list of products and you want to show your kitchen products separately. Using `where`, you can create an array containing only the products that have a `"type"` of `"kitchen"`.
Say instead you have a list of products and you only want to show those that are available to buy. You can `where` with a property name but no target value to include all products with a [truthy]({{ "/basics/truthy-and-falsy/#truthy" | prepend: site.baseurl }}) `"available"` value.
The `where` filter can also be used to find a single object in an array when combined with the `first` filter. For example, say you want to show off the shirt in your new fall collection.
description: An overview of control flow and conditional tags in the Liquid template language.
redirect_from: /tags/
---
Control flow tags create conditions that decide whether blocks of Liquid code get executed.
## if
Executes a block of code only if a certain condition is `true`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% if product.title == "Awesome Shoes" %}
These shoes are awesome!
{% endif %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
These shoes are awesome!
```
## unless
The opposite of `if`– executes a block of code only if a certain condition is **not** met.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% unless product.title == "Awesome Shoes" %}
These shoes are not awesome.
{% endunless %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
These shoes are not awesome.
```
This would be the equivalent of doing the following:
```liquid
{%- raw -%}
{% if product.title != "Awesome Shoes" %}
These shoes are not awesome.
{% endif %}
{% endraw %}
```
## elsif / else
Adds more conditions within an `if` or `unless` block.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
<!-- If customer.name = "anonymous" -->
{% if customer.name == "kevin" %}
Hey Kevin!
{% elsif customer.name == "anonymous" %}
Hey Anonymous!
{% else %}
Hi Stranger!
{% endif %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
Hey Anonymous!
```
## case/when
Creates a switch statement to execute a particular block of code when a variable has a specified value. `case` initializes the switch statement, and `when` statements define the various conditions.
A `when` tag can accept multiple values. When multiple values are provided, the expression is returned when the variable matches any of the values inside of the tag. Provide the values as a comma-separated list, or separate them using an `or` operator.
An optional `else` statement at the end of the case provides code to execute if none of the conditions are met.
| `length` | The total number of iterations in the loop. | `number` |
| `parentloop` | The parent `forloop` object. If the current `for` loop isn't nested inside another `for` loop, then `nil` is returned. | `forloop` |
| `index` | The 1-based index of the current iteration. | `number` |
| `index0` | The 0-based index of the current iteration. | `number` |
| `rindex` | The 1-based index of the current iteration, in reverse order. | `number` |
| `rindex0` | The 0-based index of the current iteration, in reverse order. | `number` |
| `first` | Returns `true` if the current iteration is the first. Returns `false` if not. | `boolean` |
| `last` | Returns `true` if the current iteration is the last. Returns `false` if not. | `boolean` |
## cycle
Loops through a group of strings and prints them in the order that they were passed as arguments. Each time `cycle` is called, the next string argument is printed.
`cycle` must be used within a [for](#for) loop block.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
```
Uses for `cycle` include:
- applying odd/even classes to rows in a table
- applying a unique class to the last product thumbnail in a row
## cycle (parameters)
`cycle` accepts a "cycle group" parameter in cases where you need multiple `cycle` blocks in one template. If no name is supplied for the cycle group, then it is assumed that multiple calls with the same parameters are one group.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% cycle "first": "one", "two", "three" %}
{% cycle "second": "one", "two", "three" %}
{% cycle "second": "one", "two", "three" %}
{% cycle "first": "one", "two", "three" %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% cycle "first": "one", "two", "three" %}
{% cycle "second": "one", "two", "three" %}
{% cycle "second": "one", "two", "three" %}
{% cycle "first": "one", "two", "three" %}
```
## tablerow
Generates an HTML table. Must be wrapped in opening `<table>` and closing `</table>` HTML tags. For a full list of attributes available within a `tablerow` loop, refer to the [`tablerowloop` object](#tablerowloop-object).
<p class="code-label">Input</p>
```liquid
{%- raw -%}
<table>
{% tablerow product in collection.products %}
{{ product.title }}
{% endtablerow %}
</table>
{% endraw %}
```
<p class="code-label">Output</p>
```html
<table>
<tr class="row1">
<td class="col1">
Cool Shirt
</td>
<td class="col2">
Alien Poster
</td>
<td class="col3">
Batman Poster
</td>
<td class="col4">
Bullseye Shirt
</td>
<td class="col5">
Another Classic Vinyl
</td>
<td class="col6">
Awesome Jeans
</td>
</tr>
</table>
```
## tablerow (parameters)
### cols
Defines how many columns the tables should have.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% tablerow product in collection.products cols:2 %}
{{ product.title }}
{% endtablerow %}
{% endraw %}
```
<p class="code-label">Output</p>
```html
<table>
<tr class="row1">
<td class="col1">
Cool Shirt
</td>
<td class="col2">
Alien Poster
</td>
</tr>
<tr class="row2">
<td class="col1">
Batman Poster
</td>
<td class="col2">
Bullseye Shirt
</td>
</tr>
<tr class="row3">
<td class="col1">
Another Classic Vinyl
</td>
<td class="col2">
Awesome Jeans
</td>
</tr>
</table>
```
#### limit
Exits the `tablerow` loop after a specific index.
```liquid
{%- raw -%}
{% tablerow product in collection.products cols:2 limit:3 %}
{{ product.title }}
{% endtablerow %}
{% endraw %}
```
### offset
Starts the `tablerow` loop after a specific index.
```liquid
{%- raw -%}
{% tablerow product in collection.products cols:2 offset:3 %}
{{ product.title }}
{% endtablerow %}
{% endraw %}
```
### range
Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.
```liquid
{%- raw -%}
<!--variable number example-->
{% assign num = 4 %}
<table>
{% tablerow i in (1..num) %}
{{ i }}
{% endtablerow %}
</table>
<!--literal number example-->
<table>
{% tablerow i in (3..5) %}
{{ i }}
{% endtablerow %}
</table>
{% endraw %}
```
## tablerowloop (object)
Information about a parent [`tablerow` loop](#tablerow).
```json
{
"col": 1,
"col0": 0,
"col_first": true,
"col_last": false,
"first": true,
"index": 1,
"index0": 0,
"last": false,
"length": 5,
"rindex": 5,
"rindex0": 4,
"row": 1
}
```
### tablerowloop (properties)
| Property | Description | Returns |
| --- | --- | --- |
| `col` | The 1-based index of the current column. | `number` |
| `col0` | The 0-based index of the current column. | `number` |
| `col_first` | Returns `true` if the current column is the first in the row. Returns `false` if not. | `boolean` |
| `col_last` | Returns `true` if the current column is the last in the row. Returns `false` if not. | `boolean` |
| `first` | Returns `true` if the current iteration is the first. Returns `false` if not. | `boolean` |
| `index` | The 1-based index of the current iteration. | `number` |
| `index0` | The 0-based index of the current iteration. | `number` |
| `last` | Returns `true` if the current iteration is the last. Returns `false` if not. | `boolean` |
| `length` | The total number of iterations in the loop. | `number` |
| `rindex` | The 1-based index of the current iteration, in reverse order. | `number` |
| `rindex0` | The 0-based index of the current iteration, in reverse order. | `number` |
| `row` | The 1-based index of current row. | `number` |
description: An overview of template tags in the Liquid template language.
redirect_from:
- /tags/comment/
- /tags/raw/
---
Template tags tell Liquid where to disable processing for comments or non-Liquid markup, and how to establish relations among template files.
## comment
Allows you to leave un-rendered code inside a Liquid template. Any text within the opening and closing `comment` blocks will not be printed, and any Liquid code within will not be executed.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign verb = "turned" %}
{% comment %}
{% assign verb = "converted" %}
{% endcomment %}
Anything you put between {% comment %} and {% endcomment %} tags
is {{ verb }} into a comment.
{% endraw %}
```
<p class="code-label">Output</p>
```liquid
{% assign verb = "turned" %}
{% comment %}
{% assign verb = "converted" %}
{% endcomment %}
Anything you put between {% comment %} and {% endcomment %} tags
is {{ verb }} into a comment.
```
## Inline comments {%- include version-badge.html version="5.4.0" %}
You can use inline comments to prevent an expression from being rendered or output. Any text inside of the tag also won't be rendered or output.
You can create multi-line inline comments. However, each line must begin with a `#`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% # for i in (1..3) -%}
{{ i }}
{% # endfor %}
{%
###############################
# This is a comment
# across multiple lines
###############################
%}
{% endraw %}
```
<p class="code-label">Output</p>
```text
```
### Inline comments inside `liquid` tags
You can use the inline comment tag inside [`liquid` tags](#liquid). The tag must be used for each line that you want to comment.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% liquid
# this is a comment
assign topic = 'Learning about comments!'
echo topic
%}
{% endraw %}
```
<p class="code-label">Output</p>
```text
Learning about comments!
```
## raw
Temporarily disables tag processing. This is useful for generating certain content that uses conflicting syntax, such as [Mustache](https://mustache.github.io/) or [Handlebars](https://handlebarsjs.com/).
<p class="code-label">Input</p>
```liquid
{{ "%7B%25+raw+%25%7D" | url_decode }}{% raw %}
In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
{% endraw %}
```
## liquid {%- include version-badge.html version="5.0.0" %}
Encloses multiple tags within one set of delimiters, to allow writing Liquid logic more concisely.
```liquid
{%- raw -%}
{% liquid
case section.blocks.size
when 1
assign column_size = ''
when 2
assign column_size = 'one-half'
when 3
assign column_size = 'one-third'
else
assign column_size = 'one-quarter'
endcase %}
{% endraw %}
```
Because any tag blocks opened within a `liquid` tag must also be closed within the same tag, use [`echo`](#echo) to output data.
## echo {%- include version-badge.html version="5.0.0" %}
Outputs an expression in the rendered HTML. This is identical to wrapping an expression in `{% raw %}{{{% endraw %}` and `{% raw %}}}{% endraw %}`, but works inside [`liquid`](#liquid) tags and supports [filters]({{ "/basics/introduction/#filters" | prepend: site.baseurl }}).
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% liquid
for product in collection.products
echo product.title | capitalize
endfor %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
Hat Shirt Pants
```
## render {%- include version-badge.html version="5.0.0" %}
Insert the rendered content of another template within the current template.
```liquid
{%- raw -%}
{% render "template-name" %}
{% endraw %}
```
Note that you don't need to write the file's `.liquid` extension.
The code within the rendered template does **not** automatically have access to the variables assigned using [variable tags]({{ "/tags/variable/" | prepend: site.baseurl }}) within the parent template. Similarly, variables assigned within the rendered template cannot be accessed by code in any other template.
## render (parameters)
Variables assigned using [variable tags]({{ "/tags/variable/" | prepend: site.baseurl }}) can be passed to a template by listing them as parameters on the `render` tag.
{% render "product" with featured_product as product %}
{% endraw %}
```
In the example above, the `product` variable in the rendered template will hold the value of `featured_product` from the parent template.
### for
A template can be rendered once for each value of an enumerable object by using the `for` and optional `as` parameters.
```liquid
{%- raw -%}
{% assign variants = product.variants %}
{% render "product_variant" for variants as variant %}
{% endraw %}
```
In the example above, the template will be rendered once for each variant of the product, and the `variant` variable will hold a different product variant object for each iteration.
When using the `for` parameter, the [`forloop`]({{ "/tags/iteration/#forloop-object" | prepend: site.baseurl }}) object is accessible within the rendered template.
## include
_The `include` tag is deprecated; please use [`render`](#render) instead._
Insert the rendered content of another template within the current template.
```liquid
{%- raw -%}
{% include "template-name" %}
{% endraw %}
```
The `include` tag works similarly to the [`render`](#render) tag, but it allows the code inside of the rendered template to access and overwrite the variables within its parent template. It has been deprecated because the way that it handles variables reduces performance and makes Liquid code harder to both read and maintain.
Note that when a template is rendered using the [`render`](#render) tag, the `include` tag cannot be used within the template.
description: An overview of tags for creating variables in the Liquid template language.
---
Variable tags create new Liquid variables.
## assign
Creates a new named variable.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign my_variable = false %}
{% if my_variable != true %}
This statement is valid.
{% endif %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
This statement is valid.
```
Wrap a value in quotations `"` to save it as a string variable.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign foo = "bar" %}
{{ foo }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% assign foo = "bar" %}
{{ foo }}
```
## capture
Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created using `capture` are stored as strings.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% capture my_variable %}I am being captured.{% endcapture %}
{{ my_variable }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
I am being captured.
```
Using `capture`, you can create complex strings using other variables created with `assign`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign favorite_food = "pizza" %}
{% assign age = 35 %}
{% capture about_me %}
I am {{ age }} and my favorite food is {{ favorite_food }}.
{% endcapture %}
{{ about_me }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
I am 35 and my favourite food is pizza.
```
## increment
Creates and outputs a new number variable with initial value `0`. On subsequent calls, it increases its value by one and outputs the new value.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% increment my_counter %}
{% increment my_counter %}
{% increment my_counter %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% increment my_counter %}
{% increment my_counter %}
{% increment my_counter %}
```
Variables created using `increment` are independent from variables created using `assign` or `capture`.
In the example below, a variable named "var" is created using `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 using `assign`.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% assign var = 10 %}
{% increment var %}
{% increment var %}
{% increment var %}
{{ var }}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% assign var = 10 %}
{% increment var %}
{% increment var %}
{% increment var %}
{{ var }}
```
## decrement
Creates and outputs a new number variable with initial value `-1`. On subsequent calls, it decreases its value by one and outputs the new value.
<p class="code-label">Input</p>
```liquid
{%- raw -%}
{% decrement variable %}
{% decrement variable %}
{% decrement variable %}
{% endraw %}
```
<p class="code-label">Output</p>
```text
{% decrement variable %}
{% decrement variable %}
{% decrement variable %}
```
Like [increment](#increment), variables declared using `decrement` are independent from variables created using `assign` or `capture`.
[{'name'=>'Arbor Draft','price'=>39900,'description'=>'the *arbor draft* is a excellent product'},
{'name'=>'Arbor Element','price'=>40000,'description'=>'the *arbor element* rocks for freestyling'},
{'name'=>'Arbor Diamond','price'=>59900,'description'=>'the *arbor diamond* is a made up product because im obsessed with arbor and have no creativity'}]
end
defmore_products_list
[{'name'=>'Arbor Catalyst','price'=>39900,'description'=>'the *arbor catalyst* is an advanced drop-through for freestyle and flatground performance and versatility'},
{'name'=>'Arbor Fish','price'=>40000,'description'=>'the *arbor fish* is a compact pin that features an extended wheelbase and time-honored teardrop shape'}]
end
defdescription
"List of Products ~ This is a list of products with price and description."
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.