mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Merge remote-tracking branch 'origin/docs-update' into docs-update
This commit is contained in:
@@ -16,7 +16,7 @@ require('load-grunt-tasks')(grunt);
|
||||
}
|
||||
},
|
||||
jekyll: {
|
||||
files: ['index.md', '_includes/*.html', '_filters/*.*', '_layouts/*.*', '_tags/*.*', '_basics/*.*'],
|
||||
files: ['index.md', '_includes/*.html', 'filters/*.*', '_layouts/*.*', 'tags/*.*', 'basics/*.*'],
|
||||
tasks: ['shell:jekyllBuild']
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Handles
|
||||
---
|
||||
|
||||
A handle is used to access the attributes of a Liquid object. By default, the handle is the object's title in lowercase with any spaces and special characters replaced by hyphens (-).
|
||||
sss A handle is used to access the attributes of a Liquid object. By default, the handle is the object's title in lowercase with any spaces and special characters replaced by hyphens (-).
|
||||
|
||||
For example, a page with the title "About Us" can be accessed in Liquid via its handle `about-us` as shown below:
|
||||
|
||||
@@ -13,7 +13,7 @@ For example, a page with the title "About Us" can be accessed in Liquid via its
|
||||
{% endraw %}
|
||||
{% endhighlight %}
|
||||
|
||||
### Creating handles
|
||||
## Creating handles
|
||||
|
||||
An object with the title "Shirt" will automatically be given the handle `shirt`. If there is already an object with the handle `shirt`, the handle will auto-increment. In other words, "Shirt" objects created after the first one will receive the handle `shirt-1`, `shirt-2`, and so on.
|
||||
|
||||
@@ -25,7 +25,7 @@ Websites often rely on static handles for pages, posts, or objects. To preserve
|
||||
|
||||
You can change an object's handle manually (TK how to change a handle manually)
|
||||
|
||||
### Accessing handle attributes
|
||||
## Accessing handle attributes
|
||||
|
||||
In many cases you may know the handle of a object whose attributes you want to access. You can access its attributes by pluralizing the name of the object, then using either the square bracket ( [ ] ) or dot ( . ) notation.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user