prepend

Filter= prepend

Adds the specified string to the beginning of another string.

INPUT

OUTPUT

{{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}

Some fruit: apples, oranges, and bananas

"prepend" can also be used with variables:

INPUT

OUTPUT

{% assign url = "example.com" %} {{ "/index.html" | prepend: url }}

example.com/index.html