From 5342f6f55a73280d95c20e0e905e6a8cec88a590 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 13 Mar 2015 15:29:02 -0700 Subject: [PATCH] Add 'append' documentation --- _filters/append.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _filters/append.md diff --git a/_filters/append.md b/_filters/append.md new file mode 100644 index 0000000..cfc7901 --- /dev/null +++ b/_filters/append.md @@ -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 %}