prepend

巴克励步

发布于:2025-01-02

在一个字符串前面附加另一个字符串。
输入

{{ "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
提交反馈