escape 對字符串轉義操作就是將字符串中的某些字符替換為轉義序列(escape sequence),這樣整個字符串就能夠用于 URL 了。如果字符串不需要轉義則不會對字符串做任何操作。 輸入 {{ "Have you read 'James & the Giant Peach'?" | escape }} 輸出 Have you read 'James & the Giant Peach'? 輸...
join 將數組中的各個字符串合并為一個字符串,并將?split?參數作為字符串之間的分隔符。 輸入 {% assign beatles = "John, Paul, George, Ringo" | split: ", " %} {{ beatles | join: " and " }} 輸出 John and Paul and George and Ringo