Add 'append' documentation

This commit is contained in:
Parker Moore
2015-03-13 15:29:02 -07:00
parent 5f1624d6f5
commit 5342f6f55a

22
_filters/append.md Normal file
View File

@@ -0,0 +1,22 @@
---
title: append
---
`append` concatenates two strings and returns the concatenated value.
{% highlight liquid %}
{% raw %}
{{ "/my/fancy/url" | append:".html" }}
{% endraw %}
# => "/my/fancy/url.html"
{% endhighlight %}
It can also be used with variables:
{% highlight liquid %}
{% raw %}
{% assign filename = "/index.html" %}
{{ product.url | append:filename }}
{% endraw %}
# => "#{product.url}/index.html"
{% endhighlight %}