mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-20 06:50:47 -07:00
docs: add doc entry for concat filter #397
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
title: concat
|
||||
---
|
||||
|
||||
Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.
|
||||
{% since %}v2.0.0{% endsince %}
|
||||
|
||||
连接多个数组,返回的数组包含所有传入数组的元素。
|
||||
|
||||
输入
|
||||
```liquid
|
||||
@@ -26,7 +28,7 @@ Concatenates (joins together) multiple arrays. The resulting array contains all
|
||||
- potatoes
|
||||
```
|
||||
|
||||
You can string together `concat` filters to join more than two arrays:
|
||||
可以链式地使用 `concat` 过滤器来连接多个数组:
|
||||
|
||||
输入
|
||||
```liquid
|
||||
|
||||
@@ -73,7 +73,7 @@ LiquidJS 把这个选项默认值设为 <code>true</code> 以兼容于 shopify/l
|
||||
|
||||
**timezoneOffset** 用来指定一个和你当地时区不同的时区,所有日期和时间输出时都转换到这个指定的时区。例如设置 `timezoneOffset: 0` 将会把所有日期按照 UTC/GMT 00:00 来输出。
|
||||
|
||||
**preserveTimezones** 是一个布尔值,只影响时间戳字面量。当设置为 `true` 时,所有字面量的时间戳字符串会在输出时保持原状,即不论输入时采取怎样的时区,输出时仍然采用那一时区(和 Shopify Liquid 的行为一致)。注意这是一个解析器参数,渲染时传入的数据中的日期的输出不会受此参数影响。
|
||||
**preserveTimezones** 是一个布尔值,只影响时间戳字面量。当设置为 `true` 时,所有字面量的时间戳字符串会在输出时保持原状,即不论输入时采取怎样的时区,输出时仍然采用那一时区(和 Shopify Liquid 的行为一致)。注意这是一个解析器参数,渲染时传入的数据中的日期的输出不会受此参数影响。注意 `preserveTimezones` 比 `timezoneOffset` 的优先级更高。
|
||||
|
||||
|
||||
## 换行和缩进
|
||||
|
||||
Reference in New Issue
Block a user