When I try to sort post there an Expected end_of_string but found pipe error

576 views Asked by At

I'd like to sort the post in the reverse sequence, but there was an error. I had tried to remove | , however, it not work well.

callback([
{% for post in site.posts reversed | sort: title %}
  {
    "text": "{{post.title | replace:'"','\"'}}",
    "href": "{{site.url}}{{site.baseurl}}{{post.url}}"
  } {% unless forloop.last %},{% endunless%}
{% endfor %}
])

There are Expected end_of_string but found pipe errors.

Liquid Warning: Liquid syntax error (line 2): Expected end_of_string but found pipe in "post in site.posts reversed | sort: title" in proselinks.jsonp
0

There are 0 answers