Liquid
基礎
簡介
運算子
真值與假值
類型
Liquid 的變體
空白控制
標籤
控制流程
迭代
樣板
變數
篩選器
abs
append
at_least
at_most
capitalize
ceil
compact
concat
date
default
divided_by
downcase
escape
escape_once
first
floor
join
last
lstrip
map
minus
modulo
newline_to_br
plus
prepend
remove
remove_first
remove_last
replace
replace_first
replace_last
reverse
round
rstrip
size
slice
sort
sort_natural
split
strip
strip_html
strip_newlines
sum
times
truncate
truncatewords
uniq
upcase
url_decode
url_encode
where
選單
abs
返回數字的絕對值。
輸入
{{
-
17
|
abs
}}
{{
4
|
abs
}}
輸出
17 4
abs
也適用於僅包含數字的字串。
輸入
{{
"-19.86"
|
abs
}}
輸出
19.86