如何在本地设置Liquid 模板?假设,我有这个液体模板,我想在本地运行它。
{%- assign deviceList = content.devices | Split: ', ' -%}
{
"fullName": "{{content.firstName | Append: ' ' | Append: content.lastName}}",
"firstNameUpperCase": "{{content.firstName | Upcase}}",
"phoneAreaCode": "{{content.phone | Slice: 1, 3}}",
"devices" : [
{%- for device in deviceList -%}
{%- if forloop.Last == true -%}
"{{device}}"
{%- else -%}
"{{device}}",
{%- endif -%}
{%- endfor -%}
]
}
甚至可能吗?