prepend

将指定的字符串添加到另一个字符串的开头。

输入

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

输出

Some fruit: apples, oranges, and bananas

prepend 也可以接受变量作为其参数。

输入

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

输出


example.com/index.html