docs: add doc entry for concat filter #397

This commit is contained in:
Harttle
2021-10-06 16:10:09 +08:00
parent fd5ef474c3
commit 24a19c092a
8 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -19,5 +19,5 @@ hexo.extend.tag.register('note', (args, text) => {
}, true)
hexo.extend.tag.register('since', (args, text) => {
return `<p class="since">Added in: ${text.trim()}</p>`
return `<p class="since">${text.trim()}</p>`
}, true)
+1
View File
@@ -65,6 +65,7 @@ filters:
truncate: truncate.html
truncatewords: truncatewords.html
uniq: uniq.html
concat: concat.html
upcase: upcase.html
url_decode: url_decode.html
url_encode: url_encode.html
+2
View File
@@ -2,6 +2,8 @@
title: concat
---
{% since %}v2.0.0{% endsince %}
Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.
Input
+1 -1
View File
@@ -11,7 +11,7 @@ Categories | Filters
Math | plus, minus, modulo, times, floor, ceil, round, divided_by, abs
String | append, prepend, capitalize, upcase, downcase, strip, lstrip, rstrip, strip_newlines, split, replace, replace_first, remove, remove_first, truncate, truncatewords
HTML/URI | escape, escape_once, url_encode, url_decode, strip_html, newline_to_br
Array | slice, map, sort, sort_natural, uniq, where, first, last, join, reverse
Array | slice, map, sort, sort_natural, uniq, where, first, last, join, reverse, concat
Date | date
[shopify/liquid]: https://github.com/Shopify/liquid
+1 -1
View File
@@ -75,7 +75,7 @@ it defaults to false. For example, when set to true, a blank string would evalu
**timezoneOffset** is used to specify a different timezone to output dates, your local timezone will be used if not specified. For example, set `timezoneOffset: 0` to output all dates in UTC/GMT 00:00.
**preserveTimezones** is a boolean effects only literal timestamps. When set to `true`, all literal timestamps will remain the same when output. This is a parser option, so Date objects passed to LiquidJS as data will not be affected.
**preserveTimezones** is a boolean effects only literal timestamps. When set to `true`, all literal timestamps will remain the same when output. This is a parser option, so Date objects passed to LiquidJS as data will not be affected. Note that `preserveTimezones` has a higher priority than `timezoneOffset`.
## Trimming
+4 -2
View File
@@ -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
+1 -1
View File
@@ -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` 的优先级更高。
## 换行和缩进
+6 -1
View File
@@ -196,6 +196,8 @@ note-warn = hsl(0, 100%, 50%)
.since
margin-top: 0;
font-style: italic;
.since::before
content: "Added in: "
.note-title
margin: 1em 0 0.5em
display: block
@@ -249,4 +251,7 @@ $article-footer-link
right: 0
.article-footer-updated
font-size: 0.9em
font-size: 0.9em
[lang="zh-cn"] .since::before
content: ""