mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Add docs for group_by and where filters
This commit is contained in:
@@ -79,6 +79,32 @@ common tasks easier.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Where</strong></p>
|
||||
<p>Select all the object in an array where the key has the given.</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
<code class="filter">{% raw %}{{ site.members | where:"graduation_year","2014" }}{% endraw %}</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Group By</strong></p>
|
||||
<p>Group an array's items by a given property.</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
<code class="filter">{% raw %}{{ site.members | group_by:"graduation_year" }}{% endraw %}</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="output">[{"name"=>"2013", "items"=>[...]},
|
||||
{"name"=>"2014", "items"=>[...]}]</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>XML Escape</strong></p>
|
||||
|
||||
Reference in New Issue
Block a user