{%assignusername="John G. Chalmers-Smith"%}{%ifusernameandusername.size>10%}
Wow, {{username}}, you have a long name!
{%else%}
Hello there!
{%endif%}
不做空白符控制的輸出
Wow, John G. Chalmers-Smith, you have a long name!
輸入
{%- assign username="John G. Chalmers-Smith" -%}{%- if username and username.size > 10 -%}
Wow, {{username}}, you have a long name!
{%- else -%}
Hello there!
{%- endif -%}
帶有空白符控制的輸出
Wow, John G. Chalmers-Smith, you have a long name!