Skip to content

Commit

Permalink
Jekyll
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Mar 10, 2015
1 parent 36341eb commit 07a5f41
Showing 1 changed file with 64 additions and 14 deletions.
78 changes: 64 additions & 14 deletions jekyll.md
Expand Up @@ -188,35 +188,84 @@ Blogging
Helpers and Filters
-------------------

### Dates

{{ site.time | date_to_xmlschema }} #=> 2008-11-07T13:07:54-08:00
{{ site.time | date_to_rfc822 }} #=> Mon, 07 Nov 2008 13:07:54 -0800
{{ site.time | date_to_string }} #=> 07 Nov 2008
{{ site.time | date_to_long_string }} #=> 07 November 2008
| date: "%Y %m %d"

| where:"year","2014"
| group_by:"genre"
| sort

| xml_escape
| cgi_escape
| uri_escape

| array_to_sentence_string
| number_of_words
### Preprocessors

| textilize
| markdownify
| jsonify
| sassify
| scssify

| camelize
| capitalize
| pluralize
### Array

site.posts | where:"year","2014"
site.posts | group_by:"genre" #=> { name, items }
site.posts | sort

| first
| last
| join: ","
| array_to_sentence_string #=> CSS, JavaScript and HTML

| map: "post" # works like 'pluck'
| size

### [String filters](http://docs.shopify.com/themes/liquid-documentation/filters)

| date: "%Y %m %d"
| default: "xxx"

| upcase
| downcase

| remove: "<p>"
| replace: "super", "mega"
| remove_first: "<p>"
| replace_first: "super", "mega"

| truncate: 5
| truncatewords: 20

| prepend: "Mr. "
| append: " Sr."

| camelize
| capitalize
| pluralize
| strip_html
| strip_newlines
| newline_to_br

| split: ','

| escape
| escape_once

| slice: -3, 3

### String filters, Jekyll-only

| number_of_words
| slugify

| xml_escape #=> CDATA
| cgi_escape #=> foo%2Cbar
| uri_escape #=> foo,%20bar

### Numbers

| minus: 2
| plus: 1
| time: 4
| divided_by: 3
| modulo: 2
Comments
--------
Expand Down Expand Up @@ -245,4 +294,5 @@ Integration
* http://docs.shopify.com/themes/liquid-basics/output
* http://docs.shopify.com/themes/liquid-basics/logic
* https://github.com/Shopify/liquid/wiki/Liquid-for-Designers
* http://docs.shopify.com/themes/liquid-documentation/filters
{% endraw %}

0 comments on commit 07a5f41

Please sign in to comment.