Files
liquid/_filters/append.md
2021-04-28 13:43:02 -04:00

671 B

title, description
title description
append Liquid filter that appends a string to another string.

Adds the specified string to the end of another string.

Input

```liquid {%- raw -%} {{ "/my/fancy/url" | append: ".html" }} {% endraw %} ```

Output

```text {{ "/my/fancy/url" | append: ".html" }} ```

append can also accept a variable as its argument.

Input

```liquid {%- raw -%} {% assign filename = "/index.html" %} {{ "website.com" | append: filename }} {% endraw %} ```

Output

```text {% assign filename = "/index.html" %} {{ "website.com" | append: filename }} ```