diff --git a/docs/scripts/tags.js b/docs/scripts/tags.js index 1d5d95712..3f449db54 100644 --- a/docs/scripts/tags.js +++ b/docs/scripts/tags.js @@ -19,5 +19,5 @@ hexo.extend.tag.register('note', (args, text) => { }, true) hexo.extend.tag.register('since', (args, text) => { - return `

Added in: ${text.trim()}

` + return `

${text.trim()}

` }, true) diff --git a/docs/source/_data/sidebar.yml b/docs/source/_data/sidebar.yml index 914ebea19..067adc729 100644 --- a/docs/source/_data/sidebar.yml +++ b/docs/source/_data/sidebar.yml @@ -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 diff --git a/docs/source/filters/concat.md b/docs/source/filters/concat.md index e896b6d13..902b1c866 100644 --- a/docs/source/filters/concat.md +++ b/docs/source/filters/concat.md @@ -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 diff --git a/docs/source/filters/overview.md b/docs/source/filters/overview.md index 7634b0277..3ecf6c10e 100644 --- a/docs/source/filters/overview.md +++ b/docs/source/filters/overview.md @@ -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 diff --git a/docs/source/tutorials/options.md b/docs/source/tutorials/options.md index a57803b74..c42b8d364 100644 --- a/docs/source/tutorials/options.md +++ b/docs/source/tutorials/options.md @@ -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 diff --git a/docs/source/zh-cn/filters/concat.md b/docs/source/zh-cn/filters/concat.md index 4ee967b2b..376375039 100644 --- a/docs/source/zh-cn/filters/concat.md +++ b/docs/source/zh-cn/filters/concat.md @@ -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 diff --git a/docs/source/zh-cn/tutorials/options.md b/docs/source/zh-cn/tutorials/options.md index ad3469b75..25362e939 100644 --- a/docs/source/zh-cn/tutorials/options.md +++ b/docs/source/zh-cn/tutorials/options.md @@ -73,7 +73,7 @@ LiquidJS 把这个选项默认值设为 true 以兼容于 shopify/l **timezoneOffset** 用来指定一个和你当地时区不同的时区,所有日期和时间输出时都转换到这个指定的时区。例如设置 `timezoneOffset: 0` 将会把所有日期按照 UTC/GMT 00:00 来输出。 -**preserveTimezones** 是一个布尔值,只影响时间戳字面量。当设置为 `true` 时,所有字面量的时间戳字符串会在输出时保持原状,即不论输入时采取怎样的时区,输出时仍然采用那一时区(和 Shopify Liquid 的行为一致)。注意这是一个解析器参数,渲染时传入的数据中的日期的输出不会受此参数影响。 +**preserveTimezones** 是一个布尔值,只影响时间戳字面量。当设置为 `true` 时,所有字面量的时间戳字符串会在输出时保持原状,即不论输入时采取怎样的时区,输出时仍然采用那一时区(和 Shopify Liquid 的行为一致)。注意这是一个解析器参数,渲染时传入的数据中的日期的输出不会受此参数影响。注意 `preserveTimezones` 比 `timezoneOffset` 的优先级更高。 ## 换行和缩进 diff --git a/docs/themes/navy/source/css/_partial/page.styl b/docs/themes/navy/source/css/_partial/page.styl index 169948231..e9cb28f8a 100644 --- a/docs/themes/navy/source/css/_partial/page.styl +++ b/docs/themes/navy/source/css/_partial/page.styl @@ -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 \ No newline at end of file + font-size: 0.9em + +[lang="zh-cn"] .since::before + content: "支持版本:" \ No newline at end of file