diff --git a/api/classes/cache_lru_.lru.html b/api/classes/cache_lru_.lru.html index cdbef20d8..dc64f5423 100644 --- a/api/classes/cache_lru_.lru.html +++ b/api/classes/cache_lru_.lru.html @@ -206,7 +206,7 @@ diff --git a/api/classes/cache_lru_.node.html b/api/classes/cache_lru_.node.html index 1ce24483c..e50888db2 100644 --- a/api/classes/cache_lru_.node.html +++ b/api/classes/cache_lru_.node.html @@ -137,7 +137,7 @@ diff --git a/api/classes/context_context_.context.html b/api/classes/context_context_.context.html index d1db20383..e6bea85bf 100644 --- a/api/classes/context_context_.context.html +++ b/api/classes/context_context_.context.html @@ -307,7 +307,7 @@ diff --git a/api/classes/drop_blank_drop_.blankdrop.html b/api/classes/drop_blank_drop_.blankdrop.html index b5de41f47..aeefff889 100644 --- a/api/classes/drop_blank_drop_.blankdrop.html +++ b/api/classes/drop_blank_drop_.blankdrop.html @@ -160,7 +160,7 @@ diff --git a/api/classes/drop_block_drop_.blockdrop.html b/api/classes/drop_block_drop_.blockdrop.html index 2b681fefb..e31998dec 100644 --- a/api/classes/drop_block_drop_.blockdrop.html +++ b/api/classes/drop_block_drop_.blockdrop.html @@ -137,7 +137,7 @@ diff --git a/api/classes/drop_drop_.drop.html b/api/classes/drop_drop_.drop.html index 5eddbd063..a18613d6f 100644 --- a/api/classes/drop_drop_.drop.html +++ b/api/classes/drop_drop_.drop.html @@ -122,7 +122,7 @@ diff --git a/api/classes/drop_empty_drop_.emptydrop.html b/api/classes/drop_empty_drop_.emptydrop.html index 40a01528d..81d2f16bb 100644 --- a/api/classes/drop_empty_drop_.emptydrop.html +++ b/api/classes/drop_empty_drop_.emptydrop.html @@ -158,7 +158,7 @@ diff --git a/api/classes/drop_forloop_drop_.forloopdrop.html b/api/classes/drop_forloop_drop_.forloopdrop.html index 800ae2cb5..ecd73b682 100644 --- a/api/classes/drop_forloop_drop_.forloopdrop.html +++ b/api/classes/drop_forloop_drop_.forloopdrop.html @@ -182,7 +182,7 @@ diff --git a/api/classes/drop_null_drop_.nulldrop.html b/api/classes/drop_null_drop_.nulldrop.html index a34e95f4c..e3072a9e9 100644 --- a/api/classes/drop_null_drop_.nulldrop.html +++ b/api/classes/drop_null_drop_.nulldrop.html @@ -157,7 +157,7 @@ diff --git a/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html b/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html index 04c363ac7..d576ba345 100644 --- a/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html +++ b/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html @@ -217,7 +217,7 @@ diff --git a/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html b/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html index b22c57fb8..0584d123b 100644 --- a/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html +++ b/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html @@ -120,7 +120,7 @@ diff --git a/api/classes/emitters_simple_emitter_.simpleemitter.html b/api/classes/emitters_simple_emitter_.simpleemitter.html index e69cd7ad2..069a2dfaa 100644 --- a/api/classes/emitters_simple_emitter_.simpleemitter.html +++ b/api/classes/emitters_simple_emitter_.simpleemitter.html @@ -120,7 +120,7 @@ diff --git a/api/classes/emitters_streamed_emitter_.streamedemitter.html b/api/classes/emitters_streamed_emitter_.streamedemitter.html index 4b06ad6b3..e18811f29 100644 --- a/api/classes/emitters_streamed_emitter_.streamedemitter.html +++ b/api/classes/emitters_streamed_emitter_.streamedemitter.html @@ -144,7 +144,7 @@ diff --git a/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html b/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html index 37159b045..4f295765b 100644 --- a/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html +++ b/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html @@ -148,7 +148,7 @@ diff --git a/api/classes/fs_loader_.loader.html b/api/classes/fs_loader_.loader.html index 7d7361d0a..4dfad4e50 100644 --- a/api/classes/fs_loader_.loader.html +++ b/api/classes/fs_loader_.loader.html @@ -248,7 +248,7 @@ diff --git a/api/classes/liquid_.liquid.html b/api/classes/liquid_.liquid.html index afed51e26..5df8bdc0c 100644 --- a/api/classes/liquid_.liquid.html +++ b/api/classes/liquid_.liquid.html @@ -620,7 +620,7 @@ diff --git a/api/classes/parser_parse_stream_.parsestream.html b/api/classes/parser_parse_stream_.parsestream.html index 07e5797f5..394b4372e 100644 --- a/api/classes/parser_parse_stream_.parsestream.html +++ b/api/classes/parser_parse_stream_.parsestream.html @@ -203,7 +203,7 @@ diff --git a/api/classes/parser_parser_.parser.html b/api/classes/parser_parser_.parser.html index 9dbd1e014..515ed41a2 100644 --- a/api/classes/parser_parser_.parser.html +++ b/api/classes/parser_parser_.parser.html @@ -296,7 +296,7 @@ diff --git a/api/classes/parser_tokenizer_.tokenizer.html b/api/classes/parser_tokenizer_.tokenizer.html index 92564717c..4c7f78078 100644 --- a/api/classes/parser_tokenizer_.tokenizer.html +++ b/api/classes/parser_tokenizer_.tokenizer.html @@ -562,7 +562,7 @@ diff --git a/api/classes/render_expression_.expression.html b/api/classes/render_expression_.expression.html index 212dffe69..f7e276d13 100644 --- a/api/classes/render_expression_.expression.html +++ b/api/classes/render_expression_.expression.html @@ -135,7 +135,7 @@ diff --git a/api/classes/render_render_.render.html b/api/classes/render_render_.render.html index 4c3ab9f2b..d4349cb33 100644 --- a/api/classes/render_render_.render.html +++ b/api/classes/render_render_.render.html @@ -142,7 +142,7 @@ diff --git a/api/classes/template_filter_filter_.filter.html b/api/classes/template_filter_filter_.filter.html index ef559ee8e..7a500907c 100644 --- a/api/classes/template_filter_filter_.filter.html +++ b/api/classes/template_filter_filter_.filter.html @@ -156,7 +156,7 @@ diff --git a/api/classes/template_filter_filter_map_.filtermap.html b/api/classes/template_filter_filter_map_.filtermap.html index 117eb280c..f957bfbc7 100644 --- a/api/classes/template_filter_filter_map_.filtermap.html +++ b/api/classes/template_filter_filter_map_.filtermap.html @@ -186,7 +186,7 @@ diff --git a/api/classes/template_html_.html.html b/api/classes/template_html_.html.html index aedadeb35..23ecfcd4a 100644 --- a/api/classes/template_html_.html.html +++ b/api/classes/template_html_.html.html @@ -147,7 +147,7 @@ diff --git a/api/classes/template_output_.output.html b/api/classes/template_output_.output.html index 7d81104d7..0f308326e 100644 --- a/api/classes/template_output_.output.html +++ b/api/classes/template_output_.output.html @@ -151,7 +151,7 @@ diff --git a/api/classes/template_tag_hash_.hash.html b/api/classes/template_tag_hash_.hash.html index eccb4673a..ea5046d76 100644 --- a/api/classes/template_tag_hash_.hash.html +++ b/api/classes/template_tag_hash_.hash.html @@ -136,7 +136,7 @@ diff --git a/api/classes/template_tag_tag_.tag.html b/api/classes/template_tag_tag_.tag.html index 663903690..8b7e83340 100644 --- a/api/classes/template_tag_tag_.tag.html +++ b/api/classes/template_tag_tag_.tag.html @@ -158,7 +158,7 @@ diff --git a/api/classes/template_tag_tag_map_.tagmap.html b/api/classes/template_tag_tag_map_.tagmap.html index bd9da9d67..f8fbe6f5d 100644 --- a/api/classes/template_tag_tag_map_.tagmap.html +++ b/api/classes/template_tag_tag_map_.tagmap.html @@ -139,7 +139,7 @@ diff --git a/api/classes/template_template_impl_.templateimpl.html b/api/classes/template_template_impl_.templateimpl.html index 7774ef111..dc34d49f5 100644 --- a/api/classes/template_template_impl_.templateimpl.html +++ b/api/classes/template_template_impl_.templateimpl.html @@ -120,7 +120,7 @@ diff --git a/api/classes/template_value_.value.html b/api/classes/template_value_.value.html index b876da1f9..b252d0421 100644 --- a/api/classes/template_value_.value.html +++ b/api/classes/template_value_.value.html @@ -145,7 +145,7 @@ diff --git a/api/classes/tokens_delimited_token_.delimitedtoken.html b/api/classes/tokens_delimited_token_.delimitedtoken.html index 528768a26..9f3ffe2b8 100644 --- a/api/classes/tokens_delimited_token_.delimitedtoken.html +++ b/api/classes/tokens_delimited_token_.delimitedtoken.html @@ -189,7 +189,7 @@ diff --git a/api/classes/tokens_filter_token_.filtertoken.html b/api/classes/tokens_filter_token_.filtertoken.html index 13bc26aee..9b33022ca 100644 --- a/api/classes/tokens_filter_token_.filtertoken.html +++ b/api/classes/tokens_filter_token_.filtertoken.html @@ -175,7 +175,7 @@ diff --git a/api/classes/tokens_hash_token_.hashtoken.html b/api/classes/tokens_hash_token_.hashtoken.html index c38a6917d..d47f94a77 100644 --- a/api/classes/tokens_hash_token_.hashtoken.html +++ b/api/classes/tokens_hash_token_.hashtoken.html @@ -175,7 +175,7 @@ diff --git a/api/classes/tokens_html_token_.htmltoken.html b/api/classes/tokens_html_token_.htmltoken.html index b7dc394d7..380d66c49 100644 --- a/api/classes/tokens_html_token_.htmltoken.html +++ b/api/classes/tokens_html_token_.htmltoken.html @@ -171,7 +171,7 @@ diff --git a/api/classes/tokens_identifier_token_.identifiertoken.html b/api/classes/tokens_identifier_token_.identifiertoken.html index f5c16054c..2f8b168e7 100644 --- a/api/classes/tokens_identifier_token_.identifiertoken.html +++ b/api/classes/tokens_identifier_token_.identifiertoken.html @@ -183,7 +183,7 @@ diff --git a/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html b/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html index eccf95db0..1f461eb64 100644 --- a/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html +++ b/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html @@ -180,7 +180,7 @@ diff --git a/api/classes/tokens_literal_token_.literaltoken.html b/api/classes/tokens_literal_token_.literaltoken.html index 0d18a27ce..f678f0b68 100644 --- a/api/classes/tokens_literal_token_.literaltoken.html +++ b/api/classes/tokens_literal_token_.literaltoken.html @@ -164,7 +164,7 @@ diff --git a/api/classes/tokens_number_token_.numbertoken.html b/api/classes/tokens_number_token_.numbertoken.html index d199f11cc..aac06430d 100644 --- a/api/classes/tokens_number_token_.numbertoken.html +++ b/api/classes/tokens_number_token_.numbertoken.html @@ -159,7 +159,7 @@ diff --git a/api/classes/tokens_operator_token_.operatortoken.html b/api/classes/tokens_operator_token_.operatortoken.html index b0686bff6..5a6a65c52 100644 --- a/api/classes/tokens_operator_token_.operatortoken.html +++ b/api/classes/tokens_operator_token_.operatortoken.html @@ -168,7 +168,7 @@ diff --git a/api/classes/tokens_output_token_.outputtoken.html b/api/classes/tokens_output_token_.outputtoken.html index f2482a4a5..fa458ecb9 100644 --- a/api/classes/tokens_output_token_.outputtoken.html +++ b/api/classes/tokens_output_token_.outputtoken.html @@ -174,7 +174,7 @@ diff --git a/api/classes/tokens_property_access_token_.propertyaccesstoken.html b/api/classes/tokens_property_access_token_.propertyaccesstoken.html index da7c60d14..d2bf66089 100644 --- a/api/classes/tokens_property_access_token_.propertyaccesstoken.html +++ b/api/classes/tokens_property_access_token_.propertyaccesstoken.html @@ -166,7 +166,7 @@ diff --git a/api/classes/tokens_quoted_token_.quotedtoken.html b/api/classes/tokens_quoted_token_.quotedtoken.html index 04dff33d8..5cbfd6e2a 100644 --- a/api/classes/tokens_quoted_token_.quotedtoken.html +++ b/api/classes/tokens_quoted_token_.quotedtoken.html @@ -161,7 +161,7 @@ diff --git a/api/classes/tokens_range_token_.rangetoken.html b/api/classes/tokens_range_token_.rangetoken.html index 8daf49306..c3e600940 100644 --- a/api/classes/tokens_range_token_.rangetoken.html +++ b/api/classes/tokens_range_token_.rangetoken.html @@ -175,7 +175,7 @@ diff --git a/api/classes/tokens_tag_token_.tagtoken.html b/api/classes/tokens_tag_token_.tagtoken.html index f53859e3a..886b66f16 100644 --- a/api/classes/tokens_tag_token_.tagtoken.html +++ b/api/classes/tokens_tag_token_.tagtoken.html @@ -180,7 +180,7 @@ diff --git a/api/classes/tokens_token_.token.html b/api/classes/tokens_token_.token.html index 63c5d3bd2..8dd12be69 100644 --- a/api/classes/tokens_token_.token.html +++ b/api/classes/tokens_token_.token.html @@ -166,7 +166,7 @@ diff --git a/api/classes/util_error_.assertionerror.html b/api/classes/util_error_.assertionerror.html index 79b29b9aa..5eb3097dc 100644 --- a/api/classes/util_error_.assertionerror.html +++ b/api/classes/util_error_.assertionerror.html @@ -130,7 +130,7 @@ diff --git a/api/classes/util_error_.internalundefinedvariableerror.html b/api/classes/util_error_.internalundefinedvariableerror.html index b7763e3e1..3eb39a3f3 100644 --- a/api/classes/util_error_.internalundefinedvariableerror.html +++ b/api/classes/util_error_.internalundefinedvariableerror.html @@ -133,7 +133,7 @@ diff --git a/api/classes/util_error_.liquiderror.html b/api/classes/util_error_.liquiderror.html index d9f0a734c..fb184d17a 100644 --- a/api/classes/util_error_.liquiderror.html +++ b/api/classes/util_error_.liquiderror.html @@ -150,7 +150,7 @@ diff --git a/api/classes/util_error_.parseerror.html b/api/classes/util_error_.parseerror.html index ec4b4eff3..4af229381 100644 --- a/api/classes/util_error_.parseerror.html +++ b/api/classes/util_error_.parseerror.html @@ -136,7 +136,7 @@ diff --git a/api/classes/util_error_.rendererror.html b/api/classes/util_error_.rendererror.html index c6652eabd..c4dac23e1 100644 --- a/api/classes/util_error_.rendererror.html +++ b/api/classes/util_error_.rendererror.html @@ -153,7 +153,7 @@ diff --git a/api/classes/util_error_.tokenizationerror.html b/api/classes/util_error_.tokenizationerror.html index e89705435..41eab7f64 100644 --- a/api/classes/util_error_.tokenizationerror.html +++ b/api/classes/util_error_.tokenizationerror.html @@ -136,7 +136,7 @@ diff --git a/api/classes/util_error_.undefinedvariableerror.html b/api/classes/util_error_.undefinedvariableerror.html index b07844abc..c5a2e751f 100644 --- a/api/classes/util_error_.undefinedvariableerror.html +++ b/api/classes/util_error_.undefinedvariableerror.html @@ -136,7 +136,7 @@ diff --git a/api/classes/util_timezone_date_.timezonedate.html b/api/classes/util_timezone_date_.timezonedate.html index bf50a5c54..999f4a8d7 100644 --- a/api/classes/util_timezone_date_.timezonedate.html +++ b/api/classes/util_timezone_date_.timezonedate.html @@ -238,7 +238,7 @@ diff --git a/api/enums/context_block_mode_.blockmode.html b/api/enums/context_block_mode_.blockmode.html index c151d8897..df0e41ce4 100644 --- a/api/enums/context_block_mode_.blockmode.html +++ b/api/enums/context_block_mode_.blockmode.html @@ -99,7 +99,7 @@ diff --git a/api/enums/fs_loader_.lookuptype.html b/api/enums/fs_loader_.lookuptype.html index 3ca6b0de2..092cc603d 100644 --- a/api/enums/fs_loader_.lookuptype.html +++ b/api/enums/fs_loader_.lookuptype.html @@ -102,7 +102,7 @@ diff --git a/api/enums/parser_token_kind_.tokenkind.html b/api/enums/parser_token_kind_.tokenkind.html index 74cc53abe..6952b3b1f 100644 --- a/api/enums/parser_token_kind_.tokenkind.html +++ b/api/enums/parser_token_kind_.tokenkind.html @@ -132,7 +132,7 @@ diff --git a/api/globals.html b/api/globals.html index f70e2f281..8c2e369d8 100644 --- a/api/globals.html +++ b/api/globals.html @@ -94,7 +94,7 @@ diff --git a/api/interfaces/cache_cache_.cache.html b/api/interfaces/cache_cache_.cache.html index ec2afd962..da7ef5852 100644 --- a/api/interfaces/cache_cache_.cache.html +++ b/api/interfaces/cache_cache_.cache.html @@ -155,7 +155,7 @@ diff --git a/api/interfaces/context_scope_.plainobject.html b/api/interfaces/context_scope_.plainobject.html index 3e4009c87..4de2dc0f9 100644 --- a/api/interfaces/context_scope_.plainobject.html +++ b/api/interfaces/context_scope_.plainobject.html @@ -102,7 +102,7 @@ diff --git a/api/interfaces/drop_comparable_.comparable.html b/api/interfaces/drop_comparable_.comparable.html index 59479f824..ca9ce3d01 100644 --- a/api/interfaces/drop_comparable_.comparable.html +++ b/api/interfaces/drop_comparable_.comparable.html @@ -186,7 +186,7 @@ diff --git a/api/interfaces/emitters_emitter_.emitter.html b/api/interfaces/emitters_emitter_.emitter.html index f69bf8d12..6e5ebec4f 100644 --- a/api/interfaces/emitters_emitter_.emitter.html +++ b/api/interfaces/emitters_emitter_.emitter.html @@ -125,7 +125,7 @@ diff --git a/api/interfaces/fs_fs_.fs.html b/api/interfaces/fs_fs_.fs.html index fb0940398..e4e2d962c 100644 --- a/api/interfaces/fs_fs_.fs.html +++ b/api/interfaces/fs_fs_.fs.html @@ -210,7 +210,7 @@ diff --git a/api/interfaces/fs_loader_.loaderoptions.html b/api/interfaces/fs_loader_.loaderoptions.html index 0a83501dc..e5363927b 100644 --- a/api/interfaces/fs_loader_.loaderoptions.html +++ b/api/interfaces/fs_loader_.loaderoptions.html @@ -114,7 +114,7 @@ diff --git a/api/interfaces/liquid_options_.liquidoptions.html b/api/interfaces/liquid_options_.liquidoptions.html index 1d0bcce6f..97759bee4 100644 --- a/api/interfaces/liquid_options_.liquidoptions.html +++ b/api/interfaces/liquid_options_.liquidoptions.html @@ -222,7 +222,7 @@ Strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (` diff --git a/api/interfaces/liquid_options_.normalizedfulloptions.html b/api/interfaces/liquid_options_.normalizedfulloptions.html index 7f90d040f..ca0ed40db 100644 --- a/api/interfaces/liquid_options_.normalizedfulloptions.html +++ b/api/interfaces/liquid_options_.normalizedfulloptions.html @@ -213,7 +213,7 @@ diff --git a/api/interfaces/liquid_options_.normalizedoptions.html b/api/interfaces/liquid_options_.normalizedoptions.html index 5df405b11..e7e89f9cf 100644 --- a/api/interfaces/liquid_options_.normalizedoptions.html +++ b/api/interfaces/liquid_options_.normalizedoptions.html @@ -252,7 +252,7 @@ Strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (` diff --git a/api/interfaces/liquid_options_.renderoptions.html b/api/interfaces/liquid_options_.renderoptions.html index 68a531298..0a7ac9172 100644 --- a/api/interfaces/liquid_options_.renderoptions.html +++ b/api/interfaces/liquid_options_.renderoptions.html @@ -108,7 +108,7 @@ diff --git a/api/interfaces/render_operator_.operators.html b/api/interfaces/render_operator_.operators.html index cbde9435f..ed01dd777 100644 --- a/api/interfaces/render_operator_.operators.html +++ b/api/interfaces/render_operator_.operators.html @@ -122,7 +122,7 @@ diff --git a/api/interfaces/template_filter_filter_impl_.filterimpl.html b/api/interfaces/template_filter_filter_impl_.filterimpl.html index 2a993e7cb..b65e79a7b 100644 --- a/api/interfaces/template_filter_filter_impl_.filterimpl.html +++ b/api/interfaces/template_filter_filter_impl_.filterimpl.html @@ -102,7 +102,7 @@ diff --git a/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html b/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html index 97cb6923b..0c4229a45 100644 --- a/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html +++ b/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html @@ -121,7 +121,7 @@ diff --git a/api/interfaces/template_tag_hash_.hashvalue.html b/api/interfaces/template_tag_hash_.hashvalue.html index 9278c73db..9b61d7e78 100644 --- a/api/interfaces/template_tag_hash_.hashvalue.html +++ b/api/interfaces/template_tag_hash_.hashvalue.html @@ -100,7 +100,7 @@ diff --git a/api/interfaces/template_tag_tag_impl_.tagimpl.html b/api/interfaces/template_tag_tag_impl_.tagimpl.html index 6c99e12d4..cebafe941 100644 --- a/api/interfaces/template_tag_tag_impl_.tagimpl.html +++ b/api/interfaces/template_tag_tag_impl_.tagimpl.html @@ -138,7 +138,7 @@ diff --git a/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html b/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html index 5bab0b084..2607e7fc6 100644 --- a/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html +++ b/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html @@ -130,7 +130,7 @@ diff --git a/api/interfaces/template_template_.template.html b/api/interfaces/template_template_.template.html index 7579c99d1..43ac34278 100644 --- a/api/interfaces/template_template_.template.html +++ b/api/interfaces/template_template_.template.html @@ -124,7 +124,7 @@ diff --git a/api/interfaces/util_async_.thenable.html b/api/interfaces/util_async_.thenable.html index 809b9fcc5..706d4e435 100644 --- a/api/interfaces/util_async_.thenable.html +++ b/api/interfaces/util_async_.thenable.html @@ -135,7 +135,7 @@ diff --git a/api/interfaces/util_liquid_date_.liquiddate.html b/api/interfaces/util_liquid_date_.liquiddate.html index 0c8c12a5c..81c784500 100644 --- a/api/interfaces/util_liquid_date_.liquiddate.html +++ b/api/interfaces/util_liquid_date_.liquiddate.html @@ -148,7 +148,7 @@ diff --git a/api/interfaces/util_operator_trie_.trie.html b/api/interfaces/util_operator_trie_.trie.html index 4407897d9..ba820fd99 100644 --- a/api/interfaces/util_operator_trie_.trie.html +++ b/api/interfaces/util_operator_trie_.trie.html @@ -100,7 +100,7 @@ diff --git a/api/interfaces/util_strftime_.formatoptions.html b/api/interfaces/util_strftime_.formatoptions.html index 7aac19116..31320ecee 100644 --- a/api/interfaces/util_strftime_.formatoptions.html +++ b/api/interfaces/util_strftime_.formatoptions.html @@ -105,7 +105,7 @@ diff --git a/api/modules/builtin_filters_array_.html b/api/modules/builtin_filters_array_.html index bf873b914..74e392d08 100644 --- a/api/modules/builtin_filters_array_.html +++ b/api/modules/builtin_filters_array_.html @@ -362,7 +362,7 @@ diff --git a/api/modules/builtin_filters_date_.html b/api/modules/builtin_filters_date_.html index 15a2bdf62..48cb76127 100644 --- a/api/modules/builtin_filters_date_.html +++ b/api/modules/builtin_filters_date_.html @@ -135,7 +135,7 @@ diff --git a/api/modules/builtin_filters_html_.html b/api/modules/builtin_filters_html_.html index 2c664bbb4..91f9986cd 100644 --- a/api/modules/builtin_filters_html_.html +++ b/api/modules/builtin_filters_html_.html @@ -201,7 +201,7 @@ diff --git a/api/modules/builtin_filters_index_.html b/api/modules/builtin_filters_index_.html index 213e27b67..3cb83ba7a 100644 --- a/api/modules/builtin_filters_index_.html +++ b/api/modules/builtin_filters_index_.html @@ -191,7 +191,7 @@ diff --git a/api/modules/builtin_filters_math_.html b/api/modules/builtin_filters_math_.html index ccd770ac0..b9af0d1c5 100644 --- a/api/modules/builtin_filters_math_.html +++ b/api/modules/builtin_filters_math_.html @@ -257,7 +257,7 @@ diff --git a/api/modules/builtin_filters_object_.html b/api/modules/builtin_filters_object_.html index c10875484..c86cfef90 100644 --- a/api/modules/builtin_filters_object_.html +++ b/api/modules/builtin_filters_object_.html @@ -142,7 +142,7 @@ diff --git a/api/modules/builtin_filters_string_.html b/api/modules/builtin_filters_string_.html index 6c34f95db..7042f1437 100644 --- a/api/modules/builtin_filters_string_.html +++ b/api/modules/builtin_filters_string_.html @@ -425,7 +425,7 @@ diff --git a/api/modules/builtin_filters_url_.html b/api/modules/builtin_filters_url_.html index 182671dc1..efdbc4597 100644 --- a/api/modules/builtin_filters_url_.html +++ b/api/modules/builtin_filters_url_.html @@ -127,7 +127,7 @@ diff --git a/api/modules/builtin_tags_assign_.html b/api/modules/builtin_tags_assign_.html index 6c7ffc1f5..6b616442e 100644 --- a/api/modules/builtin_tags_assign_.html +++ b/api/modules/builtin_tags_assign_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_block_.html b/api/modules/builtin_tags_block_.html index 37f716429..956fc171a 100644 --- a/api/modules/builtin_tags_block_.html +++ b/api/modules/builtin_tags_block_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_break_.html b/api/modules/builtin_tags_break_.html index 5121294f6..52c5f8d9c 100644 --- a/api/modules/builtin_tags_break_.html +++ b/api/modules/builtin_tags_break_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_capture_.html b/api/modules/builtin_tags_capture_.html index a4d02414b..a77e07663 100644 --- a/api/modules/builtin_tags_capture_.html +++ b/api/modules/builtin_tags_capture_.html @@ -110,7 +110,7 @@ diff --git a/api/modules/builtin_tags_case_.html b/api/modules/builtin_tags_case_.html index 20660a967..381d9d99a 100644 --- a/api/modules/builtin_tags_case_.html +++ b/api/modules/builtin_tags_case_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_comment_.html b/api/modules/builtin_tags_comment_.html index c89b07b7e..95df0aa79 100644 --- a/api/modules/builtin_tags_comment_.html +++ b/api/modules/builtin_tags_comment_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_continue_.html b/api/modules/builtin_tags_continue_.html index e9fa2ebe6..64ff62b7f 100644 --- a/api/modules/builtin_tags_continue_.html +++ b/api/modules/builtin_tags_continue_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_cycle_.html b/api/modules/builtin_tags_cycle_.html index d6dcf2dc4..bfaae01e4 100644 --- a/api/modules/builtin_tags_cycle_.html +++ b/api/modules/builtin_tags_cycle_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_decrement_.html b/api/modules/builtin_tags_decrement_.html index e9c15d78b..714a9e9ff 100644 --- a/api/modules/builtin_tags_decrement_.html +++ b/api/modules/builtin_tags_decrement_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_echo_.html b/api/modules/builtin_tags_echo_.html index afafa4e4d..83dfee77b 100644 --- a/api/modules/builtin_tags_echo_.html +++ b/api/modules/builtin_tags_echo_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_for_.html b/api/modules/builtin_tags_for_.html index 1d893d3ee..4a88c6831 100644 --- a/api/modules/builtin_tags_for_.html +++ b/api/modules/builtin_tags_for_.html @@ -162,7 +162,7 @@ diff --git a/api/modules/builtin_tags_if_.html b/api/modules/builtin_tags_if_.html index 1efd0e926..062db7cba 100644 --- a/api/modules/builtin_tags_if_.html +++ b/api/modules/builtin_tags_if_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_include_.html b/api/modules/builtin_tags_include_.html index e6fd2499a..df8f45a7d 100644 --- a/api/modules/builtin_tags_include_.html +++ b/api/modules/builtin_tags_include_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_increment_.html b/api/modules/builtin_tags_increment_.html index 6b5677ec2..299b56907 100644 --- a/api/modules/builtin_tags_increment_.html +++ b/api/modules/builtin_tags_increment_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_index_.html b/api/modules/builtin_tags_index_.html index c5ee381cb..2816cb9ca 100644 --- a/api/modules/builtin_tags_index_.html +++ b/api/modules/builtin_tags_index_.html @@ -149,7 +149,7 @@ diff --git a/api/modules/builtin_tags_layout_.html b/api/modules/builtin_tags_layout_.html index afc7913f7..5c5f72fb3 100644 --- a/api/modules/builtin_tags_layout_.html +++ b/api/modules/builtin_tags_layout_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_liquid_.html b/api/modules/builtin_tags_liquid_.html index 6371adf4f..e18b0cad7 100644 --- a/api/modules/builtin_tags_liquid_.html +++ b/api/modules/builtin_tags_liquid_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_raw_.html b/api/modules/builtin_tags_raw_.html index 36819effe..3593a0e39 100644 --- a/api/modules/builtin_tags_raw_.html +++ b/api/modules/builtin_tags_raw_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_render_.html b/api/modules/builtin_tags_render_.html index a2482e83c..3a7e3071c 100644 --- a/api/modules/builtin_tags_render_.html +++ b/api/modules/builtin_tags_render_.html @@ -160,7 +160,7 @@ diff --git a/api/modules/builtin_tags_tablerow_.html b/api/modules/builtin_tags_tablerow_.html index 3c8632760..f0d922b73 100644 --- a/api/modules/builtin_tags_tablerow_.html +++ b/api/modules/builtin_tags_tablerow_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/builtin_tags_unless_.html b/api/modules/builtin_tags_unless_.html index d9b8972b4..5d1edb04f 100644 --- a/api/modules/builtin_tags_unless_.html +++ b/api/modules/builtin_tags_unless_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/cache_cache_.html b/api/modules/cache_cache_.html index 704030615..c1b552899 100644 --- a/api/modules/cache_cache_.html +++ b/api/modules/cache_cache_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/cache_lru_.html b/api/modules/cache_lru_.html index 3645d916a..ea40c398e 100644 --- a/api/modules/cache_lru_.html +++ b/api/modules/cache_lru_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/context_block_mode_.html b/api/modules/context_block_mode_.html index 90e30bba8..407f532c8 100644 --- a/api/modules/context_block_mode_.html +++ b/api/modules/context_block_mode_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/context_context_.html b/api/modules/context_context_.html index 213d5aa07..13845bdcc 100644 --- a/api/modules/context_context_.html +++ b/api/modules/context_context_.html @@ -165,7 +165,7 @@ diff --git a/api/modules/context_scope_.html b/api/modules/context_scope_.html index 96c7e4034..f615c3aa1 100644 --- a/api/modules/context_scope_.html +++ b/api/modules/context_scope_.html @@ -96,7 +96,7 @@ diff --git a/api/modules/drop_blank_drop_.html b/api/modules/drop_blank_drop_.html index 52ae73e47..1fae4357a 100644 --- a/api/modules/drop_blank_drop_.html +++ b/api/modules/drop_blank_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/drop_block_drop_.html b/api/modules/drop_block_drop_.html index 532e6152c..0c4d96174 100644 --- a/api/modules/drop_block_drop_.html +++ b/api/modules/drop_block_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/drop_comparable_.html b/api/modules/drop_comparable_.html index 6c342ce95..7c9aa3e68 100644 --- a/api/modules/drop_comparable_.html +++ b/api/modules/drop_comparable_.html @@ -110,7 +110,7 @@ diff --git a/api/modules/drop_drop_.html b/api/modules/drop_drop_.html index 51bd88a91..d78bf7efa 100644 --- a/api/modules/drop_drop_.html +++ b/api/modules/drop_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/drop_empty_drop_.html b/api/modules/drop_empty_drop_.html index cdc2d8785..0bcc7b9a4 100644 --- a/api/modules/drop_empty_drop_.html +++ b/api/modules/drop_empty_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/drop_forloop_drop_.html b/api/modules/drop_forloop_drop_.html index bb2bd942b..1f91b29b9 100644 --- a/api/modules/drop_forloop_drop_.html +++ b/api/modules/drop_forloop_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/drop_null_drop_.html b/api/modules/drop_null_drop_.html index 09d3699b0..bbae5590e 100644 --- a/api/modules/drop_null_drop_.html +++ b/api/modules/drop_null_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/drop_tablerowloop_drop_.html b/api/modules/drop_tablerowloop_drop_.html index 46e05944f..0180f2503 100644 --- a/api/modules/drop_tablerowloop_drop_.html +++ b/api/modules/drop_tablerowloop_drop_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/emitters_emitter_.html b/api/modules/emitters_emitter_.html index e84035dc1..d1d9ae986 100644 --- a/api/modules/emitters_emitter_.html +++ b/api/modules/emitters_emitter_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/emitters_keeping_type_emitter_.html b/api/modules/emitters_keeping_type_emitter_.html index d37a8bc43..222abf81a 100644 --- a/api/modules/emitters_keeping_type_emitter_.html +++ b/api/modules/emitters_keeping_type_emitter_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/emitters_simple_emitter_.html b/api/modules/emitters_simple_emitter_.html index 45941b7fe..463bf60ea 100644 --- a/api/modules/emitters_simple_emitter_.html +++ b/api/modules/emitters_simple_emitter_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/emitters_streamed_emitter_.html b/api/modules/emitters_streamed_emitter_.html index d203b9473..9fc35f41e 100644 --- a/api/modules/emitters_streamed_emitter_.html +++ b/api/modules/emitters_streamed_emitter_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/emitters_streamed_emitter_browser_.html b/api/modules/emitters_streamed_emitter_browser_.html index d0a91aeef..767ec59a0 100644 --- a/api/modules/emitters_streamed_emitter_browser_.html +++ b/api/modules/emitters_streamed_emitter_browser_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/fs_browser_.html b/api/modules/fs_browser_.html index 79988cc72..9f6bbd47a 100644 --- a/api/modules/fs_browser_.html +++ b/api/modules/fs_browser_.html @@ -226,7 +226,7 @@ diff --git a/api/modules/fs_fs_.html b/api/modules/fs_fs_.html index 4be03cfa5..75bde668a 100644 --- a/api/modules/fs_fs_.html +++ b/api/modules/fs_fs_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/fs_loader_.html b/api/modules/fs_loader_.html index 62870358b..dc3da8a72 100644 --- a/api/modules/fs_loader_.html +++ b/api/modules/fs_loader_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/fs_node_.html b/api/modules/fs_node_.html index a9afd8608..de2ad042a 100644 --- a/api/modules/fs_node_.html +++ b/api/modules/fs_node_.html @@ -279,7 +279,7 @@ diff --git a/api/modules/liquid_.html b/api/modules/liquid_.html index 26b65d097..e9f0a0364 100644 --- a/api/modules/liquid_.html +++ b/api/modules/liquid_.html @@ -173,7 +173,7 @@ diff --git a/api/modules/liquid_options_.html b/api/modules/liquid_options_.html index f424b6cd4..80316e775 100644 --- a/api/modules/liquid_options_.html +++ b/api/modules/liquid_options_.html @@ -214,7 +214,7 @@ diff --git a/api/modules/parser_filter_arg_.html b/api/modules/parser_filter_arg_.html index 47b5beb71..1d15c1264 100644 --- a/api/modules/parser_filter_arg_.html +++ b/api/modules/parser_filter_arg_.html @@ -115,7 +115,7 @@ diff --git a/api/modules/parser_match_operator_.html b/api/modules/parser_match_operator_.html index e3c704461..e4ee449cb 100644 --- a/api/modules/parser_match_operator_.html +++ b/api/modules/parser_match_operator_.html @@ -127,7 +127,7 @@ diff --git a/api/modules/parser_parse_stream_.html b/api/modules/parser_parse_stream_.html index 70c0f53fd..7ff84c586 100644 --- a/api/modules/parser_parse_stream_.html +++ b/api/modules/parser_parse_stream_.html @@ -114,7 +114,7 @@ diff --git a/api/modules/parser_parse_string_literal_.html b/api/modules/parser_parse_string_literal_.html index 3cf391386..5b3630461 100644 --- a/api/modules/parser_parse_string_literal_.html +++ b/api/modules/parser_parse_string_literal_.html @@ -145,7 +145,7 @@ diff --git a/api/modules/parser_parser_.html b/api/modules/parser_parser_.html index b9b21fdfb..e506a7a40 100644 --- a/api/modules/parser_parser_.html +++ b/api/modules/parser_parser_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/parser_token_kind_.html b/api/modules/parser_token_kind_.html index 563f04ab9..46e58d0be 100644 --- a/api/modules/parser_token_kind_.html +++ b/api/modules/parser_token_kind_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/parser_tokenizer_.html b/api/modules/parser_tokenizer_.html index 254cc120a..d6ea1322d 100644 --- a/api/modules/parser_tokenizer_.html +++ b/api/modules/parser_tokenizer_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/parser_whitespace_ctrl_.html b/api/modules/parser_whitespace_ctrl_.html index 95e1fe151..cce4595be 100644 --- a/api/modules/parser_whitespace_ctrl_.html +++ b/api/modules/parser_whitespace_ctrl_.html @@ -156,7 +156,7 @@ diff --git a/api/modules/render_boolean_.html b/api/modules/render_boolean_.html index 22a15c651..eeafd5809 100644 --- a/api/modules/render_boolean_.html +++ b/api/modules/render_boolean_.html @@ -135,7 +135,7 @@ diff --git a/api/modules/render_expression_.html b/api/modules/render_expression_.html index 9ed2db81c..3d2f0a24c 100644 --- a/api/modules/render_expression_.html +++ b/api/modules/render_expression_.html @@ -269,7 +269,7 @@ diff --git a/api/modules/render_operator_.html b/api/modules/render_operator_.html index 8bce6780e..a9281cd3d 100644 --- a/api/modules/render_operator_.html +++ b/api/modules/render_operator_.html @@ -283,7 +283,7 @@ diff --git a/api/modules/render_render_.html b/api/modules/render_render_.html index 55d7e1a69..375b56828 100644 --- a/api/modules/render_render_.html +++ b/api/modules/render_render_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_filter_filter_.html b/api/modules/template_filter_filter_.html index ef1191f39..8bf146dd7 100644 --- a/api/modules/template_filter_filter_.html +++ b/api/modules/template_filter_filter_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_filter_filter_impl_.html b/api/modules/template_filter_filter_impl_.html index 3e83deffc..5cf2a1c25 100644 --- a/api/modules/template_filter_filter_impl_.html +++ b/api/modules/template_filter_filter_impl_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_filter_filter_impl_options_.html b/api/modules/template_filter_filter_impl_options_.html index f858a76e0..16ee44951 100644 --- a/api/modules/template_filter_filter_impl_options_.html +++ b/api/modules/template_filter_filter_impl_options_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_filter_filter_map_.html b/api/modules/template_filter_filter_map_.html index 684102388..772758e5d 100644 --- a/api/modules/template_filter_filter_map_.html +++ b/api/modules/template_filter_filter_map_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_html_.html b/api/modules/template_html_.html index 1b9c22b09..8238a671a 100644 --- a/api/modules/template_html_.html +++ b/api/modules/template_html_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_output_.html b/api/modules/template_output_.html index a8820829b..1ab9d6181 100644 --- a/api/modules/template_output_.html +++ b/api/modules/template_output_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_tag_hash_.html b/api/modules/template_tag_hash_.html index 4fe971b11..91a9f89db 100644 --- a/api/modules/template_tag_hash_.html +++ b/api/modules/template_tag_hash_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_tag_tag_.html b/api/modules/template_tag_tag_.html index e28eb04a8..a1e89dadb 100644 --- a/api/modules/template_tag_tag_.html +++ b/api/modules/template_tag_tag_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_tag_tag_impl_.html b/api/modules/template_tag_tag_impl_.html index 0e13fed07..b0a10ecb1 100644 --- a/api/modules/template_tag_tag_impl_.html +++ b/api/modules/template_tag_tag_impl_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_tag_tag_impl_options_.html b/api/modules/template_tag_tag_impl_options_.html index 5707b59df..6c0e99f7e 100644 --- a/api/modules/template_tag_tag_impl_options_.html +++ b/api/modules/template_tag_tag_impl_options_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_tag_tag_map_.html b/api/modules/template_tag_tag_map_.html index f37951aaf..c4e2cb3bf 100644 --- a/api/modules/template_tag_tag_map_.html +++ b/api/modules/template_tag_tag_map_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_template_.html b/api/modules/template_template_.html index 9d115f0a2..ceb11267b 100644 --- a/api/modules/template_template_.html +++ b/api/modules/template_template_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_template_impl_.html b/api/modules/template_template_impl_.html index 35dccec78..c989dfc87 100644 --- a/api/modules/template_template_impl_.html +++ b/api/modules/template_template_impl_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/template_value_.html b/api/modules/template_value_.html index b358ccc34..c6f831014 100644 --- a/api/modules/template_value_.html +++ b/api/modules/template_value_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_delimited_token_.html b/api/modules/tokens_delimited_token_.html index afffd1eaf..97ec2b866 100644 --- a/api/modules/tokens_delimited_token_.html +++ b/api/modules/tokens_delimited_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_filter_token_.html b/api/modules/tokens_filter_token_.html index c79053eb1..8a60dda46 100644 --- a/api/modules/tokens_filter_token_.html +++ b/api/modules/tokens_filter_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_hash_token_.html b/api/modules/tokens_hash_token_.html index 935f0e601..7f22eaf0b 100644 --- a/api/modules/tokens_hash_token_.html +++ b/api/modules/tokens_hash_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_html_token_.html b/api/modules/tokens_html_token_.html index fd9319f7a..34ccc8251 100644 --- a/api/modules/tokens_html_token_.html +++ b/api/modules/tokens_html_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_identifier_token_.html b/api/modules/tokens_identifier_token_.html index ef76d7a34..c72713b38 100644 --- a/api/modules/tokens_identifier_token_.html +++ b/api/modules/tokens_identifier_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_liquid_tag_token_.html b/api/modules/tokens_liquid_tag_token_.html index eb7f9bc71..4b0ee1539 100644 --- a/api/modules/tokens_liquid_tag_token_.html +++ b/api/modules/tokens_liquid_tag_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_literal_token_.html b/api/modules/tokens_literal_token_.html index 84b6b6e60..da4d31ab7 100644 --- a/api/modules/tokens_literal_token_.html +++ b/api/modules/tokens_literal_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_number_token_.html b/api/modules/tokens_number_token_.html index 317479276..2d260e6b8 100644 --- a/api/modules/tokens_number_token_.html +++ b/api/modules/tokens_number_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_operator_token_.html b/api/modules/tokens_operator_token_.html index b2b1d1e75..c4c6098be 100644 --- a/api/modules/tokens_operator_token_.html +++ b/api/modules/tokens_operator_token_.html @@ -113,7 +113,7 @@ diff --git a/api/modules/tokens_output_token_.html b/api/modules/tokens_output_token_.html index 151e227e2..20dd3f230 100644 --- a/api/modules/tokens_output_token_.html +++ b/api/modules/tokens_output_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_property_access_token_.html b/api/modules/tokens_property_access_token_.html index 350390a9e..9d28848fe 100644 --- a/api/modules/tokens_property_access_token_.html +++ b/api/modules/tokens_property_access_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_quoted_token_.html b/api/modules/tokens_quoted_token_.html index b88fa9a9d..f31fac5f0 100644 --- a/api/modules/tokens_quoted_token_.html +++ b/api/modules/tokens_quoted_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_range_token_.html b/api/modules/tokens_range_token_.html index e01bcd62f..1d0d14547 100644 --- a/api/modules/tokens_range_token_.html +++ b/api/modules/tokens_range_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_tag_token_.html b/api/modules/tokens_tag_token_.html index a7df3a17d..737bb1712 100644 --- a/api/modules/tokens_tag_token_.html +++ b/api/modules/tokens_tag_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_token_.html b/api/modules/tokens_token_.html index 5b00d1eb2..b146a03c3 100644 --- a/api/modules/tokens_token_.html +++ b/api/modules/tokens_token_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/tokens_toplevel_token_.html b/api/modules/tokens_toplevel_token_.html index e3c6c8f07..824e8ab5f 100644 --- a/api/modules/tokens_toplevel_token_.html +++ b/api/modules/tokens_toplevel_token_.html @@ -96,7 +96,7 @@ diff --git a/api/modules/tokens_value_token_.html b/api/modules/tokens_value_token_.html index 67b1101f0..6c8e40ae9 100644 --- a/api/modules/tokens_value_token_.html +++ b/api/modules/tokens_value_token_.html @@ -96,7 +96,7 @@ diff --git a/api/modules/types_.html b/api/modules/types_.html index fb63f1693..2f41d6300 100644 --- a/api/modules/types_.html +++ b/api/modules/types_.html @@ -155,7 +155,7 @@ diff --git a/api/modules/util_assert_.html b/api/modules/util_assert_.html index 3cd13ae86..f29ac64cf 100644 --- a/api/modules/util_assert_.html +++ b/api/modules/util_assert_.html @@ -116,7 +116,7 @@ diff --git a/api/modules/util_async_.html b/api/modules/util_async_.html index 269cafcaf..ff596004d 100644 --- a/api/modules/util_async_.html +++ b/api/modules/util_async_.html @@ -240,7 +240,7 @@ diff --git a/api/modules/util_character_.html b/api/modules/util_character_.html index e707a9723..13643f88a 100644 --- a/api/modules/util_character_.html +++ b/api/modules/util_character_.html @@ -117,7 +117,7 @@ diff --git a/api/modules/util_collection_.html b/api/modules/util_collection_.html index 66cee0416..a8e81b878 100644 --- a/api/modules/util_collection_.html +++ b/api/modules/util_collection_.html @@ -127,7 +127,7 @@ diff --git a/api/modules/util_error_.html b/api/modules/util_error_.html index 5a0d70af5..d9d28ce11 100644 --- a/api/modules/util_error_.html +++ b/api/modules/util_error_.html @@ -131,7 +131,7 @@ diff --git a/api/modules/util_liquid_date_.html b/api/modules/util_liquid_date_.html index 7dd1da56a..926a40059 100644 --- a/api/modules/util_liquid_date_.html +++ b/api/modules/util_liquid_date_.html @@ -94,7 +94,7 @@ diff --git a/api/modules/util_literal_.html b/api/modules/util_literal_.html index 07ddacad9..9511adf74 100644 --- a/api/modules/util_literal_.html +++ b/api/modules/util_literal_.html @@ -109,7 +109,7 @@ diff --git a/api/modules/util_operator_trie_.html b/api/modules/util_operator_trie_.html index 04513469f..9b4b0e9f7 100644 --- a/api/modules/util_operator_trie_.html +++ b/api/modules/util_operator_trie_.html @@ -110,7 +110,7 @@ diff --git a/api/modules/util_strftime_.html b/api/modules/util_strftime_.html index 7f0aea704..c8407f79f 100644 --- a/api/modules/util_strftime_.html +++ b/api/modules/util_strftime_.html @@ -846,7 +846,7 @@ diff --git a/api/modules/util_timezone_date_.html b/api/modules/util_timezone_date_.html index 83d4e8094..ef25458ba 100644 --- a/api/modules/util_timezone_date_.html +++ b/api/modules/util_timezone_date_.html @@ -102,7 +102,7 @@ diff --git a/api/modules/util_type_guards_.html b/api/modules/util_type_guards_.html index 95da304eb..d142e670b 100644 --- a/api/modules/util_type_guards_.html +++ b/api/modules/util_type_guards_.html @@ -297,7 +297,7 @@ diff --git a/api/modules/util_underscore_.html b/api/modules/util_underscore_.html index c699e30c2..ec91b6bb5 100644 --- a/api/modules/util_underscore_.html +++ b/api/modules/util_underscore_.html @@ -641,7 +641,7 @@ diff --git a/css/navy.css b/css/navy.css index 833fba419..20c7b858c 100644 --- a/css/navy.css +++ b/css/navy.css @@ -1 +1 @@ -:root{--color-default:#444;--color-default-invert:#d1d2d4;--color-gray:#999;--color-border:#e3e3e3;--color-navy:#171f26;--color-content-bg:#fff;--color-content-bg-hl:#eee;--color-news-bg:#161d24;--color-navy-lighter:#283542;--color-link:#0e83cd;--color-link-hover:#1094e8}@media (prefers-color-scheme:dark){:root{--color-default:#d1d2d4;--color-default-invert:#444;--color-gray:#666;--color-border:#1c1c1c;--color-backgrond:#fff;--color-navy:#171f26;--color-news-bg:#161d24;--color-content-bg-hl:#000;--color-navy-lighter:#283542;--color-content-bg:#1c1c1c;--color-link:#0e83cd;--color-link-hover:#1094e8}}a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,form,h1,h2,h3,h4,h5,h6,html,iframe,img,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-family:inherit;font-size:100%;vertical-align:baseline}body{line-height:1;color:#000;background:#fff}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0;vertical-align:middle}caption,td,th{text-align:left;font-weight:400;vertical-align:middle}a img{border:none}html{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*,:after,:before{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}button::-moz-focus-inner,input[type=button]::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=submit]::-moz-focus-inner{padding:0;margin:0;border:0}button,input,select{margin:0;padding:0;border:0}body{background:var(--color-navy);font-size:15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:var(--color-default);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}a{color:var(--color-link);text-decoration:none}a:hover{color:var(--color-link-hover);text-decoration:underline}@media print{a{color:var(--color-default);text-decoration:underline}a:after{content:" (" attr(href) ")";font-size:80%}}@media screen and (max-device-width:480px){body{-webkit-text-size-adjust:none}}@media screen{.wrapper{max-width:1200px;margin:0 auto}}@media screen{#article-toc-inner,.inner{padding:0 20px}}#content-wrap{background:var(--color-content-bg);overflow:hidden}.video-container{text-align:center}#header{position:relative;padding:10px 0}@media print{#header{display:none}}#header-inner{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}@media screen and (max-width:768px){#header-inner{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}}#logo-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 36px;-ms-flex:0 36px;flex:0 36px}#logo{text-indent:101%;white-space:nowrap;overflow:hidden;background:url(../icon/logo.png);width:36px;height:36px;-webkit-background-size:36px 36px;-moz-background-size:36px 36px;background-size:36px 36px;display:block}#main-nav{display:none;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;padding-left:20px}@media screen and (min-width:769px){#main-nav{display:block}}#search-input-wrap{display:none;padding-left:6px;border-bottom:1px solid var(--color-gray)}#search-input-wrap.on{display:inline-block}#search-input-wrap #search-input,#search-input-wrap>i,#search-input-wrap>span{vertical-align:middle;color:#fff;line-height:36px}#search-input-icon{padding-right:.5em;opacity:.7}#search-input{background:0 0;font-size:inherit;outline:0;-webkit-appearance:none}.main-nav-link{color:#fff;text-decoration:none;line-height:36px;opacity:.7;-webkit-transition:opacity .2s,color .2s;-moz-transition:opacity .2s,color .2s;-ms-transition:opacity .2s,color .2s;transition:opacity .2s,color .2s;display:inline-block;padding:0 15px}.main-nav-link i{padding-right:8px}.main-nav-link.active{opacity:1}.main-nav-link:hover{opacity:1;color:var(--color-link-hover);text-decoration:none}#github-link-wrap,#lang-select-wrap{display:none;position:relative}@media screen and (min-width:769px){#github-link-wrap,#lang-select-wrap{display:block}}#lang-select{opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:menulist-button;font-size:inherit}#banner{color:rgba(255,255,255,.8);text-align:center}#banner-title,.theme-intro-title{line-height:1.15;font-weight:300;font-size:40px}@media screen and (min-width:769px){#banner-title,.theme-intro-title{font-size:50px}}#banner-title{padding-top:20px}@media screen and (min-width:769px){#banner-title{padding-top:100px}}.theme-intro-title{margin-bottom:24px;padding-top:24px}@media screen and (min-width:769px){.theme-intro-title{padding-top:0}}#banner-start{text-align:center;padding:40px 0;line-height:47px}@media screen and (min-width:769px){#banner-start{padding:60px 0;font-size:18px}}#banner-start-command{background:var(--color-navy-lighter);padding:0 15px;color:#fff;display:inline-block}#banner-start-command:before{content:"$";opacity:.5;padding-right:10px}#banner-start-link{color:#fff;background:var(--color-link);display:inline-block;padding:0 15px;text-decoration:none;-webkit-transition:background .2s;-moz-transition:background .2s;-ms-transition:background .2s;transition:background .2s}#banner-start-link:hover{background:var(--color-link-hover)}#banner-share{display:block;padding-bottom:60px}#intro-news-list{background-color:var(--color-news-bg);margin:-1px 0}#intro-news-flex{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column}@media screen and (min-width:769px){#intro-news-flex{-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}}.intro-news-wrap{padding:24px 30px;text-decoration:none}.intro-news-wrap:hover{background-color:var(--color-link-hover)}@media screen and (min-width:769px){.intro-news-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;padding:36px 30px}}@media screen and (min-width:960px){.intro-news-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}}.intro-news-time{font-size:14px;color:rgba(255,255,255,.6)}.intro-news-wrap:hover .intro-news-time{color:rgba(255,255,255,.8)}.intro-news-title{padding-top:4px;font-size:15px;line-height:1.2;color:#fff}#intro-feature-list{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column;margin:30px 0}@media screen and (min-width:769px){#intro-feature-list{-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}}.intro-feature-wrap{margin-top:20px}@media screen and (min-width:769px){.intro-feature-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;margin-top:50px}}.intro-feature{position:relative;text-align:center}@media screen and (min-width:769px){.intro-feature{text-align:left;padding-left:70px}}.intro-feature-icon{color:var(--color-link);font-size:36px;margin-bottom:6px;text-align:center}@media screen and (min-width:769px){.intro-feature-icon{margin-bottom:26px;position:absolute;top:0;left:20px;font-size:24px;width:24px}}.intro-feature-title{color:var(--color-link);font-size:24px}.intro-feature-desc{margin-top:1em;line-height:1.6em}@media screen and (min-width:769px){.intro-feature-desc{margin-top:1.6em}}.intro-feature-desc a{text-decoration:none;color:#000}.intro-feature-desc a:hover,.intro-feature-desc a:visited{color:#000}.intro-feature-desc a:hover{text-decoration:underline}@media (prefers-color-scheme:dark){.intro-feature-desc a{color:#fff}.intro-feature-desc a:hover,.intro-feature-desc a:visited{color:#fff}}#intro-cmd-wrap{max-width:700px;padding:15px 30px;font-size:16px;overflow:auto;margin:50px auto 0}#intro-cmd-wrap pre{line-height:32px}@media screen and (min-width:769px){#intro-cmd-wrap{margin:70px auto 0}}#intro-get-started-wrap{text-align:center;margin:20px 0 50px}@media screen and (min-width:769px){#intro-get-started-wrap{margin:30px 0 70px}}#intro-get-started-link{font-size:18px;display:inline-block;text-decoration:none;border:3px solid var(--color-link-hover);padding:12px 24px;position:relative;-webkit-transition:background .2s,color .2s;-moz-transition:background .2s,color .2s;-ms-transition:background .2s,color .2s;transition:background .2s,color .2s;color:var(--color-link)}#intro-get-started-link:hover{background:var(--color-link-hover);color:#fff}#contributors-wrap,#sponsors-wrap{background:var(--color-navy-lighter);border-top:1px solid #161d24;border-bottom:1px solid #161d24;margin:-1px 0}#contributors-wrap .inner,#sponsors-wrap .inner{margin:48px 16px}@media screen and (min-width:480px){#contributors-wrap .inner,#sponsors-wrap .inner{margin:64px 32px}}#contributors-wrap .inner h3,#sponsors-wrap .inner h3{color:#fff;font-size:32px}#contributors-wrap .inner p,#sponsors-wrap .inner p{color:#ccc;margin:36px 0 24px;font-size:20px;line-height:1.5}#contributors-wrap .inner .description a,#sponsors-wrap .inner .description a{text-decoration:none}#contributors-wrap .all-contributors tr{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}#contributors-wrap .all-contributors td{margin:10px 2px 0}#contributors-wrap .all-contributors td a img{display:inline-block;height:72px;width:72px;background:var(--color-gray);border-radius:50%;margin-bottom:10px}#contributors-wrap .description a{color:#fff}#contributors-wrap .description a:hover{background:#fff;color:var(--color-navy-lighter)}#sponsors-wrap{background:var(--color-content-bg);border:none;text-align:right;overflow:hidden}#sponsors-wrap .inner h3{color:var(--color-default)}#sponsors-wrap .inner p{color:var(--color-gray)}#sponsors-wrap .inner .open-collective{margin:0 auto}#sponsors-wrap .inner .description a{color:#333}#sponsors-wrap .inner .description a:hover{background:var(--color-navy);color:#fff}@media (prefers-color-scheme:dark){#sponsors-wrap .inner p{color:var(--color-default)}#sponsors-wrap .inner .description a{color:#fff}#sponsors-wrap .inner .description a:hover{background:#fff;color:var(--color-navy-lighter)}}#playground{background:var(--color-content-bg);overflow:hidden}#playground .wrapper{margin-bottom:40px}#playground h1{font-size:36px;font-weight:300;margin:40px 0 24px}#playground .row{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;font-size:1em}#playground .row .col{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 1 100%;-ms-flex:1 1 100%;flex:1 1 100%;margin-bottom:10px}@media screen and (min-width:769px){#playground .row{-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}#playground .col:first-child{margin-right:15px}}#playground #editorEl{height:40vh}#playground #dataEl{height:28vh;margin-top:2vh}#playground #previewEl{height:70vh}#sidebar{width:220px;padding-bottom:40px;opacity:.8;display:none;padding-top:40px}@media screen and (min-width:769px){#sidebar{display:block}}.sidebar-title{margin-top:40px;padding:10px 0;font-weight:700;color:var(--color-link);display:inline-block;border-top:1px solid var(--color-border);line-height:1}.sidebar-title:first-child{margin-top:0}.sidebar-link,.toc-link{display:block;color:var(--color-default);text-decoration:none;padding:7px 0;line-height:1;position:relative;width:100%}.sidebar-link.current,.toc-link.current{color:var(--color-link)}.sidebar-link:hover,.toc-link:hover{color:var(--color-link-hover)}#content{position:relative}#content-inner{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex}#content-inner #sidebar{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 220px;-ms-flex:0 0 220px;flex:0 0 220px}#content-inner .article-container{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 100%;-ms-flex:1 100%;flex:1 100%}.article-inner{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex}.article-inner .article{width:0;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 1 100%;-ms-flex:1 1 100%;flex:1 1 100%;padding:40px 0;overflow:hidden;text-overflow:ellipsis}@media print{.article-inner .article{padding:0}}.article-inner #article-toc{display:none;width:220px;opacity:.8}@media screen and (min-width:769px){.article-inner #article-toc{display:block}}#article-toc-inner{width:220px;position:sticky;top:0;margin:40px auto}#article-toc-inner .sidebar-title{border-top:none}.toc-child{padding-left:1em;font-size:.9em}#article-toc-inner-list{overflow-y:auto}#article-toc-top{margin-top:13px;font-size:.9em;text-decoration:none;color:var(--color-default);display:block}#article-toc-top:hover{color:var(--color-link-hover)}.article-header{padding-bottom:20px;overflow:hidden}.article-title{float:left;font-size:36px;font-weight:300;text-decoration:none;color:var(--color-default);-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}a.article-title:hover{color:var(--color-link-hover)}.post .article-title{float:none}.article-date{color:var(--color-gray);text-decoration:none;display:inline-block;margin-top:1em}.article-date:hover{color:var(--color-link-hover)}.article-edit-link{float:right;text-decoration:none;color:#bbb;font-size:24px;line-height:36px;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s;display:none}.article-edit-link:hover{color:var(--color-link-hover)}@media screen and (min-width:769px){.article-edit-link{display:block}}.article-anchor{margin-left:10px;display:none}.article-anchor:before{content:"#"}@media print{.article-anchor{display:none!important}}.article-heading:hover .article-anchor{display:inline-block}.article-content{line-height:1.6em;color:var(--color-default)}@media print{.article-content{font-size:12pt}}.article-content .highlight,.article-content blockquote,.article-content dl,.article-content iframe,.article-content ol,.article-content p,.article-content table,.article-content ul{margin:1em 0}.article-content h1{font-size:2em}.article-content h2{font-size:1.5em;border-bottom:1px solid var(--color-border);padding-bottom:10px;margin-bottom:15px}.article-content h3{font-size:1.3em}.article-content h1,.article-content h2,.article-content h3,.article-content h4,.article-content h5,.article-content h6{line-height:1em;font-weight:700;margin:1em 0}.article-content hr{border-bottom:none;border-top:1px dashed var(--color-border)}.article-content a[target="_blank"]{position:relative}.article-content a[target="_blank"]::after{content:'\00f08e';font-family:icomoon;padding-left:3px;vertical-align:super;zoom:.7}.article-content strong{font-weight:700}.article-content em{font-style:italic}.article-content dl,.article-content ol,.article-content ul{margin-left:20px}.article-content dl dl,.article-content dl ol,.article-content dl ul,.article-content ol dl,.article-content ol ol,.article-content ol ul,.article-content ul dl,.article-content ul ol,.article-content ul ul{margin-top:0;margin-bottom:0}.article-content ul{list-style:disc}.article-content ol{list-style:decimal}.article-content dl{list-style:square}.article-content li p{margin:0}.article-content li .highlight,.article-content li blockquote,.article-content li iframe,.article-content li table{margin:1em 0}.article-content img,.article-content video{max-width:100%}.article-content img[src*="@2x"]{zoom:50%}.article-content blockquote{padding:0 20px;position:relative;border:1px solid var(--color-border);border-left:5px solid #ddd}.article-content blockquote footer{margin:1em 0;font-style:italic}.article-content blockquote footer cite:before{content:"—";padding:0 .3em}.article-content blockquote footer cite a{color:color-grey}@media (prefers-color-scheme:dark){.article-content blockquote{border-color:var(--color-gray)}}.article-content .note.tip{border-left-color:#fa0}.article-content .note.info{border-left-color:#0af}.article-content .note.warn{border-left-color:red}.article-content .since{margin-top:0;font-style:italic}.article-content .since::before{content:"Added in: "}.article-content .note-title{margin:1em 0 .5em;display:block;font-size:1.3em;font-weight:700}.article-content .note-title+*{margin-top:0}.article-content table{max-width:100%;border:1px solid var(--color-border)}.article-content table th{font-weight:700}.article-content table td,.article-content table th{padding:5px 15px}.article-content table tr:nth-child(2n){background:#eee}@media (prefers-color-scheme:dark){.article-content table tr:nth-child(2n){background:var(--color-gray)}}.article-footer{margin:60px 0 0;border-top:1px solid var(--color-border);text-align:center;color:var(--color-gray);line-height:1em;padding-top:1em;position:relative}@media print{.article-footer{display:none}}.article-footer-next,.article-footer-prev{color:var(--color-link);text-decoration:none;font-weight:700;text-transform:uppercase;position:absolute}.article-footer-next:hover,.article-footer-prev:hover{color:var(--color-link-hover)}@media print{.article-footer-next,.article-footer-prev{display:none}}.article-footer-next span,.article-footer-prev span{padding:0 6px}.article-footer-next i,.article-footer-next span,.article-footer-prev i,.article-footer-prev span{vertical-align:middle}.article-footer-prev{left:0}.article-footer-next{right:0}.article-footer-updated{font-size:.9em}[lang=zh-cn] .since::before{content:"支持版本:"}.mobile-nav-on{overflow:hidden;height:100%;max-height:100%}#mobile-nav{position:fixed;top:0;width:260px;left:-260px;height:100%;background:var(--color-navy);-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;transition:.4s}.mobile-nav-on #mobile-nav{-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.mobile-sidebar-list{background:var(--color-navy-lighter)}#mobile-nav-inner{overflow-y:auto;position:absolute;top:0;bottom:40px;left:0;right:0;-webkit-overflow-scrolling:touch}#mobile-nav-inner>:first-child{padding-top:10px}#mobile-nav-inner>:last-child{padding-bottom:10px}#mobile-nav-toggle{position:absolute;top:0;bottom:0;left:20px;width:25px;height:20px;margin:auto;opacity:.5;cursor:pointer;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}#mobile-nav-toggle:active,.mobile-nav-on #mobile-nav-toggle{opacity:1}@media screen and (min-width:769px){#mobile-nav-toggle{display:none}}.mobile-nav-toggle-bar{background:#fff;position:absolute;left:0;width:100%;height:2px;-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;transition:.4s;-webkit-transform-origin:0;-moz-transform-origin:0;-ms-transform-origin:0;transform-origin:0;border-radius:2px}.mobile-nav-toggle-bar:first-child{top:0}.mobile-nav-on .mobile-nav-toggle-bar:first-child{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mobile-nav-toggle-bar:nth-child(2){top:9px}.mobile-nav-on .mobile-nav-toggle-bar:nth-child(2){opacity:0}.mobile-nav-toggle-bar:last-child{top:18px}.mobile-nav-on .mobile-nav-toggle-bar:last-child{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.mobile-nav-link{color:#fff;text-decoration:none;display:block;padding:10px 15px;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-nav-title{color:var(--color-link);font-weight:700;padding:10px 15px;line-height:1;display:block;border-top:1px solid #444;margin-top:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#mobile-lang-select-wrap{position:absolute;bottom:0;left:0;width:100%;background:var(--color-navy);border-top:1px solid #444}#mobile-lang-select-label{line-height:40px;color:#fff;padding:10px 15px}#mobile-lang-select-label i{opacity:.7}#mobile-lang-select-label span{padding-left:8px}#mobile-lang-select{-webkit-appearance:menulist-button;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%}#container{-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;transition:.4s;height:100%;-webkit-overflow-scrolling:touch}.mobile-nav-on #container{-webkit-transform:translateX(260px);-moz-transform:translateX(260px);-ms-transform:translateX(260px);transform:translateX(260px);overflow:hidden}#mobile-nav-dimmer{position:absolute;top:0;left:100%;height:100%;background:#000;opacity:0;-webkit-transition:opacity .4s,-webkit-transform 0s .4s;-moz-transition:opacity .4s,-moz-transform 0s .4s;-ms-transition:opacity .4s,-ms-transform 0s .4s;transition:opacity .4s,transform 0s .4s}.mobile-nav-on #mobile-nav-dimmer{width:100%;opacity:.7;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-ms-transition:opacity .4s;transition:opacity .4s}#footer{padding:24px 0;color:rgba(255,255,255,.6);position:relative;background:var(--color-navy);text-align:center}#footer:after,#footer:before{content:"";display:table}#footer:after{clear:both}@media screen and (min-width:769px){#footer{padding:40px 0;text-align:left}}@media print{#footer{display:none}}#footer a{color:inherit;text-decoration:none;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}#footer a:hover{color:#fff}#footer .icon-twitter:hover{color:#1da1f2}#footer .icon-patreon:hover{color:#f96854}#footer .icon-opencollective:hover{color:#3384ff}#footer-copyright{line-height:1.4}@media screen and (min-width:769px){#footer-copyright{float:left}}#footer-copyright a{font-weight:700}#footer-links{margin-top:1em}@media screen and (min-width:769px){#footer-links{float:right;margin-top:0}}.footer-link{font-size:20px;margin-left:10px}.footer-link:first-child{margin-left:0}@media screen and (min-width:769px){.footer-link{font-size:30px}}.icon-oc{height:36px;width:30px;display:inline-block;-webkit-background-size:contain;-moz-background-size:contain;background-size:contain;background-repeat:no-repeat;vertical-align:text-bottom;fill:#a2a5a8;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}:root{--highlight-background:#eee;--highlight-current-line:#efefef;--highlight-selection:#d6d6d6;--highlight-foreground:#4d4d4c;--highlight-comment:#8e908c;--highlight-red:#c82829;--highlight-orange:#f5871f;--highlight-yellow:#eab700;--highlight-green:#718c00;--highlight-aqua:#3e999f;--highlight-blue:#4271ae;--highlight-purple:#8959a8}@media (prefers-color-scheme:dark){:root{--highlight-background:#000;--highlight-current-line:#2a2a2a;--highlight-selection:#424242;--highlight-foreground:#eaeaea;--highlight-comment:#969896;--highlight-red:#d54e53;--highlight-orange:#e78c45;--highlight-yellow:#e7c547;--highlight-green:#b9ca4a;--highlight-aqua:#70c0b1;--highlight-blue:#7aa6da;--highlight-purple:#c397d8}}code,pre{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;color:var(--highlight-foreground);background:var(--color-content-bg-hl)}code{padding:0 5px}pre{padding:10px 15px;line-height:22px}pre code{border:none;display:block;padding:0}.highlight{padding:10px 15px;color:var(--highlight-foreground);background:var(--highlight-background);overflow:auto;margin:0}.highlight table{margin:0!important;border:0}.highlight table td,.highlight table th{padding:0}.highlight figcaption{margin:-5px 0 5px;color:var(--color-gray)}.highlight figcaption:after,.highlight figcaption:before{content:"";display:table}.highlight figcaption:after{clear:both}.highlight figcaption a{float:right}.highlight pre{margin:0;padding:0;background:0 0}.highlight .line{height:22px}pre .comment,pre .title{color:var(--highlight-comment)}pre .attribute,pre .css .class,pre .css .id,pre .css .pseudo,pre .html .doctype,pre .regexp,pre .ruby .constant,pre .tag,pre .variable,pre .xml .doctype,pre .xml .pi,pre .xml .tag .title{color:var(--highlight-red)}pre .built_in,pre .constant,pre .literal,pre .number,pre .params,pre .preprocessor{color:var(--highlight-orange)}pre .class,pre .css .rules .attribute,pre .ruby .class .title{color:var(--highlight-green)}pre .header,pre .inheritance,pre .ruby .symbol,pre .string,pre .value,pre .xml .cdata{color:var(--highlight-green)}pre .css .hexcolor{color:var(--highlight-aqua)}pre .coffeescript .title,pre .function,pre .javascript .title,pre .perl .sub,pre .python .decorator,pre .python .title,pre .ruby .function .title,pre .ruby .title .keyword{color:var(--highlight-blue)}pre .javascript .function,pre .keyword{color:var(--highlight-purple)}@font-face{font-family:icomoon;src:url(../fonts/icomoon.eot?e8nnma);src:url(../fonts/icomoon.eot?e8nnma#iefix) format('embedded-opentype'),url(../fonts/icomoon.ttf?e8nnma) format('truetype'),url(../fonts/icomoon.woff?e8nnma) format('woff'),url(../fonts/icomoon.svg?e8nnma#icomoon) format('svg');font-weight:400;font-style:normal;font-display:block}i{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-shopify:before{content:"\e905"}.icon-network:before{content:"\e902"}.icon-opencollective:before{content:"\e903"}.icon-patreon:before{content:"\e904"}.icon-search:before{content:"\f002"}.icon-gear:before{content:"\f013"}.icon-pencil:before{content:"\f040"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-arrow-right:before{content:"\f061"}.icon-twitter:before{content:"\f099"}.icon-github:before{content:"\f09b"}.icon-shield:before{content:"\f132"}.icon-rocket:before{content:"\e9a5"}.icon-typescript:before{content:"\e900"}.icon-chat-bubble-dots:before{content:"\e901"}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-webkit-input-placeholder{color:#aaa}.searchbox__input:-ms-input-placeholder{color:#aaa}.searchbox__input::-ms-input-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:0 0;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;-webkit-animation-name:sbx-reset-in;animation-name:sbx-reset-in;-webkit-animation-duration:.15s;animation-duration:.15s}@-webkit-keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:0 0;border:none;z-index:999;max-width:600px;min-width:500px;box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69,142,225,.05)}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143,187,237,.1);padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 rgba(69,142,225,.8);color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:0 0}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;box-shadow:none}.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block} \ No newline at end of file +:root{--color-default:#444;--color-default-invert:#d1d2d4;--color-gray:#999;--color-border:#e3e3e3;--color-navy:#171f26;--color-content-bg:#fff;--color-news-bg:#161d24;--color-navy-lighter:#283542;--color-link:#0e83cd;--color-link-hover:#1094e8}@media (prefers-color-scheme:dark){:root{--color-default:#d1d2d4;--color-default-invert:#444;--color-gray:#666;--color-border:#1c1c1c;--color-backgrond:#fff;--color-navy:#171f26;--color-news-bg:#161d24;--color-navy-lighter:#283542;--color-content-bg:#1c1c1c;--color-link:#0e83cd;--color-link-hover:#1094e8}}a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,form,h1,h2,h3,h4,h5,h6,html,iframe,img,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-family:inherit;font-size:100%;vertical-align:baseline}body{line-height:1;color:#000;background:#fff}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0;vertical-align:middle}caption,td,th{text-align:left;font-weight:400;vertical-align:middle}a img{border:none}html{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*,:after,:before{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}button::-moz-focus-inner,input[type=button]::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=submit]::-moz-focus-inner{padding:0;margin:0;border:0}button,input,select{margin:0;padding:0;border:0}body{background:var(--color-navy);font-size:15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:var(--color-default);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}a{color:var(--color-link);text-decoration:none}a:hover{color:var(--color-link-hover);text-decoration:underline}@media print{a{color:var(--color-default);text-decoration:underline}a:after{content:" (" attr(href) ")";font-size:80%}}@media screen and (max-device-width:480px){body{-webkit-text-size-adjust:none}}@media screen{.wrapper{max-width:1200px;margin:0 auto}}@media screen{#article-toc-inner,.inner{padding:0 20px}}#content-wrap{background:var(--color-content-bg);overflow:hidden}.video-container{text-align:center}#header{position:relative;padding:10px 0}@media print{#header{display:none}}#header-inner{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}@media screen and (max-width:768px){#header-inner{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}}#logo-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 36px;-ms-flex:0 36px;flex:0 36px}#logo{text-indent:101%;white-space:nowrap;overflow:hidden;background:url(../icon/logo.png);width:36px;height:36px;-webkit-background-size:36px 36px;-moz-background-size:36px 36px;background-size:36px 36px;display:block}#main-nav{display:none;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;padding-left:20px}@media screen and (min-width:769px){#main-nav{display:block}}#search-input-wrap{display:none;padding-left:6px;border-bottom:1px solid var(--color-gray)}#search-input-wrap.on{display:inline-block}#search-input-wrap #search-input,#search-input-wrap>i,#search-input-wrap>span{vertical-align:middle;color:#fff;line-height:36px}#search-input-icon{padding-right:.5em;opacity:.7}#search-input{background:0 0;font-size:inherit;outline:0;-webkit-appearance:none}.main-nav-link{color:#fff;text-decoration:none;line-height:36px;opacity:.7;-webkit-transition:opacity .2s,color .2s;-moz-transition:opacity .2s,color .2s;-ms-transition:opacity .2s,color .2s;transition:opacity .2s,color .2s;display:inline-block;padding:0 15px}.main-nav-link i{padding-right:8px}.main-nav-link.active{opacity:1}.main-nav-link:hover{opacity:1;color:var(--color-link-hover);text-decoration:none}#github-link-wrap,#lang-select-wrap{display:none;position:relative}@media screen and (min-width:769px){#github-link-wrap,#lang-select-wrap{display:block}}#lang-select{opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:menulist-button;font-size:inherit}#banner{color:rgba(255,255,255,.8);text-align:center}#banner-title,.theme-intro-title{line-height:1.15;font-weight:300;font-size:40px}@media screen and (min-width:769px){#banner-title,.theme-intro-title{font-size:50px}}#banner-title{padding-top:20px}@media screen and (min-width:769px){#banner-title{padding-top:100px}}.theme-intro-title{margin-bottom:24px;padding-top:24px}@media screen and (min-width:769px){.theme-intro-title{padding-top:0}}#banner-start{text-align:center;padding:40px 0;line-height:47px}@media screen and (min-width:769px){#banner-start{padding:60px 0;font-size:18px}}#banner-start-command{background:var(--color-navy-lighter);padding:0 15px;color:#fff;display:inline-block}#banner-start-command:before{content:"$";opacity:.5;padding-right:10px}#banner-start-link{color:#fff;background:var(--color-link);display:inline-block;padding:0 15px;text-decoration:none;-webkit-transition:background .2s;-moz-transition:background .2s;-ms-transition:background .2s;transition:background .2s}#banner-start-link:hover{background:var(--color-link-hover)}#banner-share{display:block;padding-bottom:60px}#intro-news-list{background-color:var(--color-news-bg);margin:-1px 0}#intro-news-flex{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column}@media screen and (min-width:769px){#intro-news-flex{-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}}.intro-news-wrap{padding:24px 30px;text-decoration:none}.intro-news-wrap:hover{background-color:var(--color-link-hover)}@media screen and (min-width:769px){.intro-news-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;padding:36px 30px}}@media screen and (min-width:960px){.intro-news-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}}.intro-news-time{font-size:14px;color:rgba(255,255,255,.6)}.intro-news-wrap:hover .intro-news-time{color:rgba(255,255,255,.8)}.intro-news-title{padding-top:4px;font-size:15px;line-height:1.2;color:#fff}#intro-feature-list{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column;margin:30px 0}@media screen and (min-width:769px){#intro-feature-list{-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}}.intro-feature-wrap{margin-top:20px}@media screen and (min-width:769px){.intro-feature-wrap{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;margin-top:50px}}.intro-feature{position:relative;text-align:center}@media screen and (min-width:769px){.intro-feature{text-align:left;padding-left:70px}}.intro-feature-icon{color:var(--color-link);font-size:36px;margin-bottom:6px;text-align:center}@media screen and (min-width:769px){.intro-feature-icon{margin-bottom:26px;position:absolute;top:0;left:20px;font-size:24px;width:24px}}.intro-feature-title{color:var(--color-link);font-size:24px}.intro-feature-desc{margin-top:1em;line-height:1.6em}@media screen and (min-width:769px){.intro-feature-desc{margin-top:1.6em}}.intro-feature-desc a{text-decoration:none;color:#000}.intro-feature-desc a:hover,.intro-feature-desc a:visited{color:#000}.intro-feature-desc a:hover{text-decoration:underline}@media (prefers-color-scheme:dark){.intro-feature-desc a{color:#fff}.intro-feature-desc a:hover,.intro-feature-desc a:visited{color:#fff}}#intro-cmd-wrap{max-width:700px;padding:15px 30px;font-size:16px;overflow:auto;margin:50px auto 0}#intro-cmd-wrap pre{line-height:32px}@media screen and (min-width:769px){#intro-cmd-wrap{margin:70px auto 0}}#intro-get-started-wrap{text-align:center;margin:20px 0 50px}@media screen and (min-width:769px){#intro-get-started-wrap{margin:30px 0 70px}}#intro-get-started-link{font-size:18px;display:inline-block;text-decoration:none;border:3px solid var(--color-link-hover);padding:12px 24px;position:relative;-webkit-transition:background .2s,color .2s;-moz-transition:background .2s,color .2s;-ms-transition:background .2s,color .2s;transition:background .2s,color .2s;color:var(--color-link)}#intro-get-started-link:hover{background:var(--color-link-hover);color:#fff}#contributors-wrap,#sponsors-wrap{background:var(--color-navy-lighter);border-top:1px solid #161d24;border-bottom:1px solid #161d24;margin:-1px 0}#contributors-wrap .inner,#sponsors-wrap .inner{margin:48px 16px}@media screen and (min-width:480px){#contributors-wrap .inner,#sponsors-wrap .inner{margin:64px 32px}}#contributors-wrap .inner h3,#sponsors-wrap .inner h3{color:#fff;font-size:32px}#contributors-wrap .inner p,#sponsors-wrap .inner p{color:#ccc;margin:36px 0 24px;font-size:20px;line-height:1.5}#contributors-wrap .inner .description a,#sponsors-wrap .inner .description a{text-decoration:none}#contributors-wrap .all-contributors tr{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}#contributors-wrap .all-contributors td{margin:10px 2px 0}#contributors-wrap .all-contributors td a img{display:inline-block;height:72px;width:72px;background:var(--color-gray);border-radius:50%;margin-bottom:10px}#contributors-wrap .description a{color:#fff}#contributors-wrap .description a:hover{background:#fff;color:var(--color-navy-lighter)}#sponsors-wrap{background:var(--color-content-bg);border:none;text-align:right;overflow:hidden}#sponsors-wrap .inner h3{color:var(--color-default)}#sponsors-wrap .inner p{color:var(--color-gray)}#sponsors-wrap .inner .open-collective{margin:0 auto}#sponsors-wrap .inner .description a{color:#333}#sponsors-wrap .inner .description a:hover{background:var(--color-navy);color:#fff}@media (prefers-color-scheme:dark){#sponsors-wrap .inner p{color:var(--color-default)}#sponsors-wrap .inner .description a{color:#fff}#sponsors-wrap .inner .description a:hover{background:#fff;color:var(--color-navy-lighter)}}#playground{background:var(--color-content-bg);overflow:hidden}#playground .wrapper{margin-bottom:40px}#playground h1{font-size:36px;font-weight:300;margin:40px 0 24px}#playground .row{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;font-size:1em}#playground .row .col{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 1 100%;-ms-flex:1 1 100%;flex:1 1 100%;margin-bottom:10px}@media screen and (min-width:769px){#playground .row{-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap}#playground .col:first-child{margin-right:15px}}#playground #editorEl{height:40vh}#playground #dataEl{height:28vh;margin-top:2vh}#playground #previewEl{height:70vh}#sidebar{width:220px;padding-bottom:40px;opacity:.8;display:none;padding-top:40px}@media screen and (min-width:769px){#sidebar{display:block}}.sidebar-title{margin-top:40px;padding:10px 0;font-weight:700;color:var(--color-link);display:inline-block;border-top:1px solid var(--color-border);line-height:1}.sidebar-title:first-child{margin-top:0}.sidebar-link,.toc-link{display:block;color:var(--color-default);text-decoration:none;padding:7px 0;line-height:1;position:relative;width:100%}.sidebar-link.current,.toc-link.current{color:var(--color-link)}.sidebar-link:hover,.toc-link:hover{color:var(--color-link-hover)}#content{position:relative}#content-inner{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex}#content-inner #sidebar{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:0 0 220px;-ms-flex:0 0 220px;flex:0 0 220px}#content-inner .article-container{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 100%;-ms-flex:1 100%;flex:1 100%}.article-inner{display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:box;display:flex}.article-inner .article{width:0;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;-webkit-flex:1 1 100%;-ms-flex:1 1 100%;flex:1 1 100%;padding:40px 0;overflow:hidden;text-overflow:ellipsis}@media print{.article-inner .article{padding:0}}.article-inner #article-toc{display:none;width:220px;opacity:.8}@media screen and (min-width:769px){.article-inner #article-toc{display:block}}#article-toc-inner{width:220px;position:sticky;top:0;margin:40px auto}#article-toc-inner .sidebar-title{border-top:none}.toc-child{padding-left:1em;font-size:.9em}#article-toc-inner-list{overflow-y:auto}#article-toc-top{margin-top:13px;font-size:.9em;text-decoration:none;color:var(--color-default);display:block}#article-toc-top:hover{color:var(--color-link-hover)}.article-header{padding-bottom:20px;overflow:hidden}.article-title{float:left;font-size:36px;font-weight:300;text-decoration:none;color:var(--color-default);-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}a.article-title:hover{color:var(--color-link-hover)}.post .article-title{float:none}.article-date{color:var(--color-gray);text-decoration:none;display:inline-block;margin-top:1em}.article-date:hover{color:var(--color-link-hover)}.article-edit-link{float:right;text-decoration:none;color:#bbb;font-size:24px;line-height:36px;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s;display:none}.article-edit-link:hover{color:var(--color-link-hover)}@media screen and (min-width:769px){.article-edit-link{display:block}}.article-anchor{margin-left:10px;display:none}.article-anchor:before{content:"#"}@media print{.article-anchor{display:none!important}}.article-heading:hover .article-anchor{display:inline-block}.article-content{line-height:1.6em;color:var(--color-default)}@media print{.article-content{font-size:12pt}}.article-content .highlight,.article-content blockquote,.article-content dl,.article-content iframe,.article-content ol,.article-content p,.article-content table,.article-content ul{margin:1em 0}.article-content h1{font-size:2em}.article-content h2{font-size:1.5em;border-bottom:1px solid var(--color-border);padding-bottom:10px;margin-bottom:15px}.article-content h3{font-size:1.3em}.article-content h1,.article-content h2,.article-content h3,.article-content h4,.article-content h5,.article-content h6{line-height:1em;font-weight:700;margin:1em 0}.article-content hr{border-bottom:none;border-top:1px dashed var(--color-border)}.article-content a[target="_blank"]{position:relative}.article-content a[target="_blank"]::after{content:'\00f08e';font-family:icomoon;padding-left:3px;vertical-align:super;zoom:.7}.article-content strong{font-weight:700}.article-content em{font-style:italic}.article-content dl,.article-content ol,.article-content ul{margin-left:20px}.article-content dl dl,.article-content dl ol,.article-content dl ul,.article-content ol dl,.article-content ol ol,.article-content ol ul,.article-content ul dl,.article-content ul ol,.article-content ul ul{margin-top:0;margin-bottom:0}.article-content ul{list-style:disc}.article-content ol{list-style:decimal}.article-content dl{list-style:square}.article-content li p{margin:0}.article-content li .highlight,.article-content li blockquote,.article-content li iframe,.article-content li table{margin:1em 0}.article-content img,.article-content video{max-width:100%}.article-content img[src*="@2x"]{zoom:50%}.article-content blockquote{padding:0 20px;position:relative;border:1px solid var(--color-border);border-left:5px solid #ddd}.article-content blockquote footer{margin:1em 0;font-style:italic}.article-content blockquote footer cite:before{content:"—";padding:0 .3em}.article-content blockquote footer cite a{color:color-grey}@media (prefers-color-scheme:dark){.article-content blockquote{border-color:var(--color-gray)}}.article-content .note.tip{border-left-color:#fa0}.article-content .note.info{border-left-color:#0af}.article-content .note.warn{border-left-color:red}.article-content .since{margin-top:0;font-style:italic}.article-content .since::before{content:"Added in: "}.article-content .note-title{margin:1em 0 .5em;display:block;font-size:1.3em;font-weight:700}.article-content .note-title+*{margin-top:0}.article-content table{max-width:100%;border:1px solid var(--color-border)}.article-content table th{font-weight:700}.article-content table td,.article-content table th{padding:5px 15px}.article-content table tr:nth-child(2n){background:#eee}@media (prefers-color-scheme:dark){.article-content table tr:nth-child(2n){background:var(--color-gray)}}.article-footer{margin:60px 0 0;border-top:1px solid var(--color-border);text-align:center;color:var(--color-gray);line-height:1em;padding-top:1em;position:relative}@media print{.article-footer{display:none}}.article-footer-next,.article-footer-prev{color:var(--color-link);text-decoration:none;font-weight:700;text-transform:uppercase;position:absolute}.article-footer-next:hover,.article-footer-prev:hover{color:var(--color-link-hover)}@media print{.article-footer-next,.article-footer-prev{display:none}}.article-footer-next span,.article-footer-prev span{padding:0 6px}.article-footer-next i,.article-footer-next span,.article-footer-prev i,.article-footer-prev span{vertical-align:middle}.article-footer-prev{left:0}.article-footer-next{right:0}.article-footer-updated{font-size:.9em}[lang=zh-cn] .since::before{content:"支持版本:"}.mobile-nav-on{overflow:hidden;height:100%;max-height:100%}#mobile-nav{position:fixed;top:0;width:260px;left:-260px;height:100%;background:var(--color-navy);-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;transition:.4s}.mobile-nav-on #mobile-nav{-webkit-transform:translateX(100%);-moz-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.mobile-sidebar-list{background:var(--color-navy-lighter)}#mobile-nav-inner{overflow-y:auto;position:absolute;top:0;bottom:40px;left:0;right:0;-webkit-overflow-scrolling:touch}#mobile-nav-inner>:first-child{padding-top:10px}#mobile-nav-inner>:last-child{padding-bottom:10px}#mobile-nav-toggle{position:absolute;top:0;bottom:0;left:20px;width:25px;height:20px;margin:auto;opacity:.5;cursor:pointer;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}#mobile-nav-toggle:active,.mobile-nav-on #mobile-nav-toggle{opacity:1}@media screen and (min-width:769px){#mobile-nav-toggle{display:none}}.mobile-nav-toggle-bar{background:#fff;position:absolute;left:0;width:100%;height:2px;-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;transition:.4s;-webkit-transform-origin:0;-moz-transform-origin:0;-ms-transform-origin:0;transform-origin:0;border-radius:2px}.mobile-nav-toggle-bar:first-child{top:0}.mobile-nav-on .mobile-nav-toggle-bar:first-child{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mobile-nav-toggle-bar:nth-child(2){top:9px}.mobile-nav-on .mobile-nav-toggle-bar:nth-child(2){opacity:0}.mobile-nav-toggle-bar:last-child{top:18px}.mobile-nav-on .mobile-nav-toggle-bar:last-child{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.mobile-nav-link{color:#fff;text-decoration:none;display:block;padding:10px 15px;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-nav-title{color:var(--color-link);font-weight:700;padding:10px 15px;line-height:1;display:block;border-top:1px solid #444;margin-top:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#mobile-lang-select-wrap{position:absolute;bottom:0;left:0;width:100%;background:var(--color-navy);border-top:1px solid #444}#mobile-lang-select-label{line-height:40px;color:#fff;padding:10px 15px}#mobile-lang-select-label i{opacity:.7}#mobile-lang-select-label span{padding-left:8px}#mobile-lang-select{-webkit-appearance:menulist-button;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%}#container{-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;transition:.4s;height:100%;-webkit-overflow-scrolling:touch}.mobile-nav-on #container{-webkit-transform:translateX(260px);-moz-transform:translateX(260px);-ms-transform:translateX(260px);transform:translateX(260px);overflow:hidden}#mobile-nav-dimmer{position:absolute;top:0;left:100%;height:100%;background:#000;opacity:0;-webkit-transition:opacity .4s,-webkit-transform 0s .4s;-moz-transition:opacity .4s,-moz-transform 0s .4s;-ms-transition:opacity .4s,-ms-transform 0s .4s;transition:opacity .4s,transform 0s .4s}.mobile-nav-on #mobile-nav-dimmer{width:100%;opacity:.7;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-ms-transition:opacity .4s;transition:opacity .4s}#footer{padding:24px 0;color:rgba(255,255,255,.6);position:relative;background:var(--color-navy);text-align:center}#footer:after,#footer:before{content:"";display:table}#footer:after{clear:both}@media screen and (min-width:769px){#footer{padding:40px 0;text-align:left}}@media print{#footer{display:none}}#footer a{color:inherit;text-decoration:none;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}#footer a:hover{color:#fff}#footer .icon-twitter:hover{color:#1da1f2}#footer .icon-patreon:hover{color:#f96854}#footer .icon-opencollective:hover{color:#3384ff}#footer-copyright{line-height:1.4}@media screen and (min-width:769px){#footer-copyright{float:left}}#footer-copyright a{font-weight:700}#footer-links{margin-top:1em}@media screen and (min-width:769px){#footer-links{float:right;margin-top:0}}.footer-link{font-size:20px;margin-left:10px}.footer-link:first-child{margin-left:0}@media screen and (min-width:769px){.footer-link{font-size:30px}}.icon-oc{height:36px;width:30px;display:inline-block;-webkit-background-size:contain;-moz-background-size:contain;background-size:contain;background-repeat:no-repeat;vertical-align:text-bottom;fill:#a2a5a8;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;transition:.2s}:root{--highlight-background:#2d2d2d;--highlight-current-line:#393939;--highlight-selection:#515151;--highlight-foreground:#ccc;--highlight-comment:#999;--highlight-red:#f2777a;--highlight-orange:#f99157;--highlight-yellow:#fc6;--highlight-green:#9c9;--highlight-aqua:#6cc;--highlight-blue:#69c;--highlight-purple:#c9c}code,pre{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;color:var(--highlight-foreground);background:var(--highlight-background)}code{padding:0 5px}pre{padding:10px 15px;line-height:22px}pre code{border:none;display:block;padding:0}.highlight{padding:10px 15px;color:var(--highlight-foreground);background:var(--highlight-background);overflow:auto;margin:0}.highlight table{margin:0!important;border:0}.highlight table td,.highlight table th{padding:0}.highlight figcaption{margin:-5px 0 5px;color:var(--color-gray)}.highlight figcaption:after,.highlight figcaption:before{content:"";display:table}.highlight figcaption:after{clear:both}.highlight figcaption a{float:right}.highlight pre{margin:0;padding:0;background:0 0}.highlight .line{height:22px}pre .comment,pre .title{color:var(--highlight-comment)}pre .attribute,pre .css .class,pre .css .id,pre .css .pseudo,pre .html .doctype,pre .regexp,pre .ruby .constant,pre .tag,pre .variable,pre .xml .doctype,pre .xml .pi,pre .xml .tag .title{color:var(--highlight-red)}pre .built_in,pre .constant,pre .literal,pre .number,pre .params,pre .preprocessor{color:var(--highlight-orange)}pre .class,pre .css .rules .attribute,pre .ruby .class .title{color:var(--highlight-green)}pre .header,pre .inheritance,pre .ruby .symbol,pre .string,pre .value,pre .xml .cdata{color:var(--highlight-green)}pre .css .hexcolor{color:var(--highlight-aqua)}pre .coffeescript .title,pre .function,pre .javascript .title,pre .perl .sub,pre .python .decorator,pre .python .title,pre .ruby .function .title,pre .ruby .title .keyword{color:var(--highlight-blue)}pre .javascript .function,pre .keyword{color:var(--highlight-purple)}@font-face{font-family:icomoon;src:url(../fonts/icomoon.eot?e8nnma);src:url(../fonts/icomoon.eot?e8nnma#iefix) format('embedded-opentype'),url(../fonts/icomoon.ttf?e8nnma) format('truetype'),url(../fonts/icomoon.woff?e8nnma) format('woff'),url(../fonts/icomoon.svg?e8nnma#icomoon) format('svg');font-weight:400;font-style:normal;font-display:block}i{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-shopify:before{content:"\e905"}.icon-network:before{content:"\e902"}.icon-opencollective:before{content:"\e903"}.icon-patreon:before{content:"\e904"}.icon-search:before{content:"\f002"}.icon-gear:before{content:"\f013"}.icon-pencil:before{content:"\f040"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-arrow-right:before{content:"\f061"}.icon-twitter:before{content:"\f099"}.icon-github:before{content:"\f09b"}.icon-shield:before{content:"\f132"}.icon-rocket:before{content:"\e9a5"}.icon-typescript:before{content:"\e900"}.icon-chat-bubble-dots:before{content:"\e901"}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-webkit-input-placeholder{color:#aaa}.searchbox__input:-ms-input-placeholder{color:#aaa}.searchbox__input::-ms-input-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:0 0;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;-webkit-animation-name:sbx-reset-in;animation-name:sbx-reset-in;-webkit-animation-duration:.15s;animation-duration:.15s}@-webkit-keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes sbx-reset-in{0%{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0);opacity:0}to{-webkit-transform:none;transform:none;opacity:1}}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:0 0;border:none;z-index:999;max-width:600px;min-width:500px;box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69,142,225,.05)}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143,187,237,.1);padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 rgba(69,142,225,.8);color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:0 0}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;box-shadow:none}.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block} \ No newline at end of file diff --git a/filters/abs.html b/filters/abs.html index 303a97e68..0526a1b55 100644 --- a/filters/abs.html +++ b/filters/abs.html @@ -95,27 +95,27 @@

Liquid filter that returns the absolute value of a number.

Input

-
{{ -17 | abs }}
+
{{ -17 | abs }}

Output

-
17
+
17

Input

-
{{ 4 | abs }}
+
{{ 4 | abs }}

Output

-
4
+
4

abs will also work on a string that only contains a number:

Input

-
{{ "-19.86" | abs }}
+
{{ "-19.86" | abs }}

Output

-
19.86
+
19.86
diff --git a/filters/append.html b/filters/append.html index 836c22564..e4edd2eaa 100644 --- a/filters/append.html +++ b/filters/append.html @@ -95,21 +95,23 @@

Concatenates two strings and returns the concatenated value.

Input

-
{{ "/my/fancy/url" | append: ".html" }}
+
{{ "/my/fancy/url" | append: ".html" }}

Output

-
/my/fancy/url.html
+
/my/fancy/url.html

append can also be used with variables:

Input

-
{% assign filename = "/index.html" %}
{{ "website.com" | append: filename }}
+
{% assign filename = "/index.html" %}
+{{ "website.com" | append: filename }}

Output

-

website.com/index.html
+

+website.com/index.html
diff --git a/filters/at_least.html b/filters/at_least.html index 2965754cc..ba5be7adb 100644 --- a/filters/at_least.html +++ b/filters/at_least.html @@ -95,20 +95,20 @@

Limits a number to a minimum value.

Input

-
{{ 4 | at_least: 5 }}
+
{{ 4 | at_least: 5 }}

Output

-
5
+
5

Input

-
{{ 4 | at_least: 3 }}
+
{{ 4 | at_least: 3 }}

Output

-
4
+
4
diff --git a/filters/at_most.html b/filters/at_most.html index fd3bc2446..7daf847f3 100644 --- a/filters/at_most.html +++ b/filters/at_most.html @@ -95,20 +95,20 @@

Limits a number to a maximum value.

Input

-
{{ 4 | at_most: 5 }}
+
{{ 4 | at_most: 5 }}

Output

-
4
+
4

Input

-
{{ 4 | at_most: 3 }}
+
{{ 4 | at_most: 3 }}

Output

-
3
+
3
diff --git a/filters/capitalize.html b/filters/capitalize.html index 3d33e18fe..a62f410dd 100644 --- a/filters/capitalize.html +++ b/filters/capitalize.html @@ -95,21 +95,21 @@

Makes the first character of a string capitalized.

Input

-
{{ "title" | capitalize }}
+
{{ "title" | capitalize }}

Output

-
Title
+
Title

capitalize only capitalizes the first character of a string, so later words are not affected:

Input

-
{{ "my great title" | capitalize }}
+
{{ "my great title" | capitalize }}

Output

-
My great title
+
My great title
diff --git a/filters/ceil.html b/filters/ceil.html index dc1ac0dcf..eeb96dfe2 100644 --- a/filters/ceil.html +++ b/filters/ceil.html @@ -95,33 +95,33 @@

Rounds the input up to the nearest whole number. LiquidJS tries to convert the input to a number before the filter is applied.

Input

-
{{ 1.2 | ceil }}
+
{{ 1.2 | ceil }}

Output

-
2
+
2

Input

-
{{ 2.0 | ceil }}
+
{{ 2.0 | ceil }}

Output

-
2
+
2

Input

-
{{ 183.357 | ceil }}
+
{{ 183.357 | ceil }}

Output

-
184
+
184

Here the input value is a string:

Input

-
{{ "3.5" | ceil }}
+
{{ "3.5" | ceil }}

Output

-
4
+
4
diff --git a/filters/compact.html b/filters/compact.html index d085bf2d0..c20181d10 100644 --- a/filters/compact.html +++ b/filters/compact.html @@ -96,21 +96,39 @@

Removes any nil values from an array.

For this example, assume site.pages is an array of content pages for a website, and some of these pages have an attribute called category that specifies their content category. If we map those categories to an array, some of the array items might be nil if any pages do not have a category attribute.

Input

-
{% assign site_categories = site.pages | map: "category" %}

{% for category in site_categories %}
- {{ category }}
{% endfor %}
+
{% assign site_categories = site.pages | map: "category" %}
+
+{% for category in site_categories %}
+- {{ category }}
+{% endfor %}

Output

-
- business
- celebrities
-
- lifestyle
- sports
-
- technology
+
- business
+- celebrities
+-
+- lifestyle
+- sports
+-
+- technology

By using compact when we create our site_categories array, we can remove all the nil values in the array.

Input

-
{% assign site_categories = site.pages | map: "category" | compact %}

{% for category in site_categories %}
- {{ category }}
{% endfor %}
+
{% assign site_categories = site.pages | map: "category" | compact %}
+
+{% for category in site_categories %}
+- {{ category }}
+{% endfor %}

Output

-
- business
- celebrities
- lifestyle
- sports
- technology
+
- business
+- celebrities
+- lifestyle
+- sports
+- technology
diff --git a/filters/concat.html b/filters/concat.html index bbc618a2c..2fa0ccc04 100644 --- a/filters/concat.html +++ b/filters/concat.html @@ -95,21 +95,47 @@

Concatenates (joins together) multiple arrays. The resulting array contains all the items from the input arrays.

Input

-
{% assign fruits = "apples, oranges, peaches" | split: ", " %}
{% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}

{% assign everything = fruits | concat: vegetables %}

{% for item in everything %}
- {{ item }}
{% endfor %}
+
{% assign fruits = "apples, oranges, peaches" | split: ", " %}
+{% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}
+
+{% assign everything = fruits | concat: vegetables %}
+
+{% for item in everything %}
+- {{ item }}
+{% endfor %}

Output

-
- apples
- oranges
- peaches
- carrots
- turnips
- potatoes
+
- apples
+- oranges
+- peaches
+- carrots
+- turnips
+- potatoes

You can string together concat filters to join more than two arrays:

Input

-
{% assign furniture = "chairs, tables, shelves" | split: ", " %}

{% assign everything = fruits | concat: vegetables | concat: furniture %}

{% for item in everything %}
- {{ item }}
{% endfor %}
+
{% assign furniture = "chairs, tables, shelves" | split: ", " %}
+
+{% assign everything = fruits | concat: vegetables | concat: furniture %}
+
+{% for item in everything %}
+- {{ item }}
+{% endfor %}

Output

-
- apples
- oranges
- peaches
- carrots
- turnips
- potatoes
- chairs
- tables
- shelves
+
- apples
+- oranges
+- peaches
+- carrots
+- turnips
+- potatoes
+- chairs
+- tables
+- shelves
diff --git a/filters/date.html b/filters/date.html index 15a582c69..87253654f 100644 --- a/filters/date.html +++ b/filters/date.html @@ -95,36 +95,36 @@

Converts a timestamp into another date format. LiquidJS tries to be conformant with Shopify/Liquid which is using Ruby’s core Time#strftime(string). The input is firstly converted to Date object via new Date().

Input

-
{{ article.published_at | date: "%a, %b %d, %y" }}
+
{{ article.published_at | date: "%a, %b %d, %y" }}

Output

-
Fri, Jul 17, 15
+
Fri, Jul 17, 15
TimeZone

Date will be converted to local time before output. To avoid that, you can set timezoneOffset LiquidJS option to 0, its default value is your local timezone offset which can be obtained by new Date().getTimezoneOffset().

Input

-
{{ article.published_at | date: "%Y" }}
+
{{ article.published_at | date: "%Y" }}

Output

-
2015
+
2015

date works on strings if they contain well-formatted dates:

Input

-
{{ "March 14, 2016" | date: "%b %d, %y" }}
+
{{ "March 14, 2016" | date: "%b %d, %y" }}

Output

-
Mar 14, 16
+
Mar 14, 16
Timestamp Strings

Note that LiquidJS is using JavaScript [Date][newDate] to parse the input string, that means IETF-compliant RFC 2822 timestamps and strings in a version of ISO8601 are supported.

To get the current time, pass the special word "now" (or "today") to date:

Input

-
This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.
+
This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.

Output

-
This page was last updated at 2020-03-25 15:57.
+
This page was last updated at 2020-03-25 15:57.
now

Note that the value will be the current time of when the page was last generated from the template, not when the page is presented to a user if caching or static site generation is involved.

@@ -132,7 +132,7 @@ diff --git a/filters/default.html b/filters/default.html index aaca77817..e4d4c62cc 100644 --- a/filters/default.html +++ b/filters/default.html @@ -96,38 +96,41 @@

Allows you to specify a fallback in case a value doesn’t exist. default will show its value if the left side is falsy or empty (string or Array).

In this example, product_price is not defined, so the default value is used.

Input

-
{{ product_price | default: 2.99 }}
+
{{ product_price | default: 2.99 }}

Output

-
2.99
+
2.99

In this example, product_price is defined, so the default value is not used.

Input

-
{% assign product_price = 4.99 %}
{{ product_price | default: 2.99 }}
+
{% assign product_price = 4.99 %}
+{{ product_price | default: 2.99 }}

Output

-
4.99
+
4.99

In this example, product_price is empty, so the default value is used.

Input

-
{% assign product_price = "" %}
{{ product_price | default: 2.99 }}
+
{% assign product_price = "" %}
+{{ product_price | default: 2.99 }}

Output

-
2.99
+
2.99

Allowing false

v9.32.0

To allow variables to return false instead of the default value, you can use the allow_false parameter.

Input

-
{% assign display_price = false %}
{{ display_price | default: true, allow_false: true }}
+
{% assign display_price = false %}
+{{ display_price | default: true, allow_false: true }}

Output

-
false
+
false
diff --git a/filters/divided_by.html b/filters/divided_by.html index 5aaf42bb7..7d17db74d 100644 --- a/filters/divided_by.html +++ b/filters/divided_by.html @@ -95,16 +95,16 @@

Divides a number by another number. The result is the string obtained by JavaScript .toString() of the result number.

Input

-
{{ 16 | divided_by: 4 }}
+
{{ 16 | divided_by: 4 }}

Output

-
4
+
4

Input

-
{{ 5 | divided_by: 3 }}
+
{{ 5 | divided_by: 3 }}

Output

-
1.6666666666666667
+
1.6666666666666667
Integer Arithmetic

Since JavaScript doesn’t differentiate integers and floats, LiquidJS is not capable of integer arithmetic and the return type is always number, the string representation of which depends on its value.

@@ -112,7 +112,7 @@ diff --git a/filters/downcase.html b/filters/downcase.html index 8d14a4048..627ff3990 100644 --- a/filters/downcase.html +++ b/filters/downcase.html @@ -95,20 +95,20 @@

Makes each character in a string lowercase. It has no effect on strings which are already all lowercase.

Input

-
{{ "Parker Moore" | downcase }}
+
{{ "Parker Moore" | downcase }}

Output

-
parker moore
+
parker moore

Input

-
{{ "apple" | downcase }}
+
{{ "apple" | downcase }}

Output

-
apple
+
apple
diff --git a/filters/escape.html b/filters/escape.html index e8a6d74c5..8d9c3002e 100644 --- a/filters/escape.html +++ b/filters/escape.html @@ -95,7 +95,7 @@

Escapes a string by replacing HTML special characters with escape sequences. It doesn’t change strings that don’t have anything to escape.

Input

-
{{ "Have you read 'James & the Giant Peach'?" | escape }}
+
{{ "Have you read 'James & the Giant Peach'?" | escape }}

Output

@@ -103,14 +103,14 @@ Have you read 'James & the Giant Peach'?
 

Input

-
{{ "Tetsuro Takara" | escape }}
+
{{ "Tetsuro Takara" | escape }}

Output

-
Tetsuro Takara
+
Tetsuro Takara
diff --git a/filters/escape_once.html b/filters/escape_once.html index 1c7c04d17..9fd53b893 100644 --- a/filters/escape_once.html +++ b/filters/escape_once.html @@ -95,7 +95,7 @@

Escapes a string without changing existing escaped entities. It doesn’t change strings that don’t have anything to escape.

Input

-
{{ "1 < 2 & 3" | escape_once }}
+
{{ "1 < 2 & 3" | escape_once }}

Output

@@ -114,7 +114,7 @@
 
               
               
             
diff --git a/filters/first.html b/filters/first.html
index d8abfc131..a5af81d85 100644
--- a/filters/first.html
+++ b/filters/first.html
@@ -95,23 +95,27 @@
 
 

Returns the first item of an array.

Input

-
{{ "Ground control to Major Tom." | split: " " | first }}
+
{{ "Ground control to Major Tom." | split: " " | first }}

Output

-
Ground
+
Ground

Input

-
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.first }}
+
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
+{{ my_array.first }}

Output

-

zebra
+

+zebra

You can use first with dot notation when you need to use the filter inside a tag:

-
{% if my_array.first == "zebra" %}
Here comes a zebra!
{% endif %}
+
{% if my_array.first == "zebra" %}
+  Here comes a zebra!
+{% endif %}
diff --git a/filters/floor.html b/filters/floor.html index a4aa38f4e..95208e29d 100644 --- a/filters/floor.html +++ b/filters/floor.html @@ -95,33 +95,33 @@

Rounds the input down to the nearest whole number. LiquidJS tries to convert the input to a number before the filter is applied.

Input

-
{{ 1.2 | floor }}
+
{{ 1.2 | floor }}

Output

-
1
+
1

Input

-
{{ 2.0 | floor }}
+
{{ 2.0 | floor }}

Output

-
2
+
2

Input

-
{{ 183.357 | floor }}
+
{{ 183.357 | floor }}

Output

-
183
+
183

Here the input value is a string:

Input

-
{{ "3.5" | floor }}
+
{{ "3.5" | floor }}

Output

-
3
+
3
diff --git a/filters/join.html b/filters/join.html index 893709b21..16c3e7f1f 100644 --- a/filters/join.html +++ b/filters/join.html @@ -95,14 +95,16 @@

Combines the items in an array into a single string using the argument as a separator.

Input

-
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
{{ beatles | join: " and " }}
+
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
+{{ beatles | join: " and " }}

Output

-

John and Paul and George and Ringo
+

+John and Paul and George and Ringo
diff --git a/filters/json.html b/filters/json.html index 324168beb..d6b926c9e 100644 --- a/filters/json.html +++ b/filters/json.html @@ -95,14 +95,15 @@

Convert values to string via JSON.stringify(), for debug purpose.

Input

-
{% assign arr = "foo bar coo" | split: " " %}
{{ arr | json }}
+
{% assign arr = "foo bar coo" | split: " " %}
+{{ arr | json }}

Output

-
["foo","bar","coo"]
+
["foo","bar","coo"]
diff --git a/filters/last.html b/filters/last.html index e13b76a89..9e7740112 100644 --- a/filters/last.html +++ b/filters/last.html @@ -95,23 +95,27 @@

Returns the last item of an array.

Input

-
{{ "Ground control to Major Tom." | split: " " | last }}
+
{{ "Ground control to Major Tom." | split: " " | last }}

Output

-
Tom.
+
Tom.

Input

-
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.last }}
+
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
+{{ my_array.last }}

Output

-

tiger
+

+tiger

You can use last with dot notation when you need to use the filter inside a tag:

-
{% if my_array.last == "tiger" %}
There goes a tiger!
{% endif %}
+
{% if my_array.last == "tiger" %}
+  There goes a tiger!
+{% endif %}
diff --git a/filters/lstrip.html b/filters/lstrip.html index 38b066615..eb45d3e68 100644 --- a/filters/lstrip.html +++ b/filters/lstrip.html @@ -95,14 +95,14 @@

Removes all whitespace (tabs, spaces, and newlines) from the left side of a string. It does not affect spaces between words.

Input

-
BEGIN{{ "          So much room for activities!          " | lstrip }}END
+
BEGIN{{ "          So much room for activities!          " | lstrip }}END

Output

-
BEGINSo much room for activities!          END
+
BEGINSo much room for activities!          END
diff --git a/filters/map.html b/filters/map.html index 1b234465b..d351d893d 100644 --- a/filters/map.html +++ b/filters/map.html @@ -96,14 +96,22 @@

Creates an array of values by extracting the values of a named property from another object.

In this example, assume the object site.pages contains all the metadata for a website. Using assign with the map filter creates a variable that contains only the values of the category properties of everything in the site.pages object.

Input

-
{% assign all_categories = site.pages | map: "category" %}

{% for item in all_categories %}
- {{ item }}
{% endfor %}
+
{% assign all_categories = site.pages | map: "category" %}
+
+{% for item in all_categories %}
+- {{ item }}
+{% endfor %}

Output

-
- business
- celebrities
- lifestyle
- sports
- technology
+
- business
+- celebrities
+- lifestyle
+- sports
+- technology
diff --git a/filters/minus.html b/filters/minus.html index 95c037e65..873b404d9 100644 --- a/filters/minus.html +++ b/filters/minus.html @@ -95,26 +95,26 @@

Subtracts a number from another number.

Input

-
{{ 4 | minus: 2 }}
+
{{ 4 | minus: 2 }}

Output

-
2
+
2

Input

-
{{ 16 | minus: 4 }}
+
{{ 16 | minus: 4 }}

Output

-
12
+
12

Input

-
{{ 183.357 | minus: 12 }}
+
{{ 183.357 | minus: 12 }}

Output

-
171.357
+
171.357
diff --git a/filters/modulo.html b/filters/modulo.html index 4f3521e1d..43bbbc750 100644 --- a/filters/modulo.html +++ b/filters/modulo.html @@ -95,26 +95,26 @@

Returns the remainder of a division operation.

Input

-
{{ 3 | modulo: 2 }}
+
{{ 3 | modulo: 2 }}

Output

-
1
+
1

Input

-
{{ 24 | modulo: 7 }}
+
{{ 24 | modulo: 7 }}

Output

-
3
+
3

Input

-
{{ 183.357 | modulo: 12 }}
+
{{ 183.357 | modulo: 12 }}

Output

-
3.3569999999999993
+
3.3569999999999993
diff --git a/filters/newline_to_br.html b/filters/newline_to_br.html index b6daf1412..2f2104a92 100644 --- a/filters/newline_to_br.html +++ b/filters/newline_to_br.html @@ -95,14 +95,20 @@

Replaces every newline (\n) in a string with an HTML line break (<br />).

Input

-
{% capture string_with_newlines %}
Hello
there
{% endcapture %}

{{ string_with_newlines | newline_to_br }}
+
{% capture string_with_newlines %}
+Hello
+there
+{% endcapture %}
+
+{{ string_with_newlines | newline_to_br }}

Output

-

<br/>Hello<br/>there<br/>
+

+<br/>Hello<br/>there<br/>
diff --git a/filters/overview.html b/filters/overview.html index 1e4e2cbfe..b5ed159a7 100644 --- a/filters/overview.html +++ b/filters/overview.html @@ -124,7 +124,7 @@ diff --git a/filters/plus.html b/filters/plus.html index 6f91c8d1b..e180f3f5f 100644 --- a/filters/plus.html +++ b/filters/plus.html @@ -95,26 +95,26 @@

Adds a number to another number.

Input

-
{{ 4 | plus: 2 }}
+
{{ 4 | plus: 2 }}

Output

-
6
+
6

Input

-
{{ 16 | plus: 4 }}
+
{{ 16 | plus: 4 }}

Output

-
20
+
20

Input

-
{{ 183.357 | plus: 12 }}
+
{{ 183.357 | plus: 12 }}

Output

-
195.357
+
195.357
diff --git a/filters/prepend.html b/filters/prepend.html index af4b46705..0921d61a8 100644 --- a/filters/prepend.html +++ b/filters/prepend.html @@ -95,21 +95,23 @@

Adds the specified string to the beginning of another string.

Input

-
{{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}
+
{{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}

Output

-
Some fruit: apples, oranges, and bananas
+
Some fruit: apples, oranges, and bananas

prepend can also be used with variables:

Input

-
{% assign url = "example.com" %}
{{ "/index.html" | prepend: url }}
+
{% assign url = "example.com" %}
+{{ "/index.html" | prepend: url }}

Output

-

example.com/index.html
+

+example.com/index.html
diff --git a/filters/remove.html b/filters/remove.html index 8d67fe317..d3ab74f4f 100644 --- a/filters/remove.html +++ b/filters/remove.html @@ -95,14 +95,14 @@

Removes every occurrence of the specified substring from a string.

Input

-
{{ "I strained to see the train through the rain" | remove: "rain" }}
+
{{ "I strained to see the train through the rain" | remove: "rain" }}

Output

-
I strained to see the t through the 
+
I strained to see the t through the 
diff --git a/filters/remove_first.html b/filters/remove_first.html index de2734c0d..7535b72c9 100644 --- a/filters/remove_first.html +++ b/filters/remove_first.html @@ -95,14 +95,14 @@

Removes only the first occurrence of the specified substring from a string.

Input

-
{{ "I strained to see the train through the rain" | remove_first: "rain" }}
+
{{ "I strained to see the train through the rain" | remove_first: "rain" }}

Output

-
I strained to see the t through the rain
+
I strained to see the t through the rain
diff --git a/filters/replace.html b/filters/replace.html index bc6d8ae50..3e3bb68a9 100644 --- a/filters/replace.html +++ b/filters/replace.html @@ -95,14 +95,14 @@

Replaces every occurrence of the first argument in a string with the second argument.

Input

-
{{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}
+
{{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}

Output

-
Take your protein pills and put your helmet on
+
Take your protein pills and put your helmet on
diff --git a/filters/replace_first.html b/filters/replace_first.html index 3a648691a..fd4279a21 100644 --- a/filters/replace_first.html +++ b/filters/replace_first.html @@ -95,14 +95,14 @@

Replaces only the first occurrence of the first argument in a string with the second argument.

Input

-
{{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}
+
{{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}

Output

-
Take your protein pills and put my helmet on
+
Take your protein pills and put my helmet on
diff --git a/filters/reverse.html b/filters/reverse.html index a4856f70c..7feab3dff 100644 --- a/filters/reverse.html +++ b/filters/reverse.html @@ -95,21 +95,25 @@

Reverses the order of the items in an array. reverse cannot reverse a string.

Input

-
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

{{ my_array | reverse | join: ", " }}
+
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
+
+{{ my_array | reverse | join: ", " }}

Output

-


plums, peaches, oranges, apples
+

+
+plums, peaches, oranges, apples

Although reverse cannot be used directly on a string, you can split a string into an array, reverse the array, and rejoin it by chaining together filters:

Input

-
{{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}
+
{{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}

Output

-
.moT rojaM ot lortnoc dnuorG
+
.moT rojaM ot lortnoc dnuorG
diff --git a/filters/round.html b/filters/round.html index 64220bf54..f3795f2ca 100644 --- a/filters/round.html +++ b/filters/round.html @@ -95,26 +95,26 @@

Rounds a number to the nearest integer or, if a number is passed as an argument, to that number of decimal places.

Input

-
{{ 1.2 | round }}
+
{{ 1.2 | round }}

Output

-
1
+
1

Input

-
{{ 2.7 | round }}
+
{{ 2.7 | round }}

Output

-
3
+
3

Input

-
{{ 183.357 | round: 2 }}
+
{{ 183.357 | round: 2 }}

Output

-
183.36
+
183.36
diff --git a/filters/rstrip.html b/filters/rstrip.html index 420445d72..c1787a36d 100644 --- a/filters/rstrip.html +++ b/filters/rstrip.html @@ -95,14 +95,14 @@

Removes all whitespace (tabs, spaces, and newlines) from the right side of a string. It does not affect spaces between words.

Input

-
BEGIN{{ "          So much room for activities!          " | rstrip }}END
+
BEGIN{{ "          So much room for activities!          " | rstrip }}END

Output

-
BEGIN          So much room for activities!END
+
BEGIN          So much room for activities!END
diff --git a/filters/size.html b/filters/size.html index 68aae9e57..8813b1fd0 100644 --- a/filters/size.html +++ b/filters/size.html @@ -95,23 +95,29 @@

Returns the number of characters in a string or the number of items in an array.

Input

-
{{ "Ground control to Major Tom." | size }}
+
{{ "Ground control to Major Tom." | size }}

Output

-
28
+
28

Input

-
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

{{ my_array.size }}
+
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
+
+{{ my_array.size }}

Output

-


4
+

+
+4

You can use size with dot notation when you need to use the filter inside a tag:

-
{% if site.pages.size > 10 %}
This is a big website!
{% endif %}
+
{% if site.pages.size > 10 %}
+  This is a big website!
+{% endif %}
diff --git a/filters/slice.html b/filters/slice.html index 0fc50fb87..e5c57ea8a 100644 --- a/filters/slice.html +++ b/filters/slice.html @@ -96,33 +96,33 @@

Returns a substring of 1 character beginning at the index specified by the first argument. An optional second argument specifies the length of the substring to be returned.

String indices are numbered starting from 0.

Input

-
{{ "Liquid" | slice: 0 }}
+
{{ "Liquid" | slice: 0 }}

Output

-
L
+
L

Input

-
{{ "Liquid" | slice: 2 }}
+
{{ "Liquid" | slice: 2 }}

Output

-
q
+
q

Input

-
{{ "Liquid" | slice: 2, 5 }}
+
{{ "Liquid" | slice: 2, 5 }}

Output

-
quid
+
quid

If the first argument is a negative number, the indices are counted from the end of the string:

Input

-
{{ "Liquid" | slice: -3, 2 }}
+
{{ "Liquid" | slice: -3, 2 }}

Output

-
ui
+
ui
diff --git a/filters/sort.html b/filters/sort.html index 34ccb8b2f..0cc1362a8 100644 --- a/filters/sort.html +++ b/filters/sort.html @@ -95,17 +95,24 @@

Sorts items in an array in case-sensitive order.

Input

-
{% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

{{ my_array | sort | join: ", " }}
+
{% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}
+
+{{ my_array | sort | join: ", " }}

Output

-


Sally Snake, giraffe, octopus, zebra
+

+
+Sally Snake, giraffe, octopus, zebra

An optional argument specifies which property of the array’s items to use for sorting.

-
{% assign products_by_price = collection.products | sort: "price" %}
{% for product in products_by_price %}
<h4>{{ product.title }}</h4>
{% endfor %}
+
{% assign products_by_price = collection.products | sort: "price" %}
+{% for product in products_by_price %}
+  <h4>{{ product.title }}</h4>
+{% endfor %}
diff --git a/filters/sort_natural.html b/filters/sort_natural.html index eceb30dd5..c48acd5ae 100644 --- a/filters/sort_natural.html +++ b/filters/sort_natural.html @@ -95,17 +95,24 @@

Sorts items in an array in case-insensitive order.

Input

-
{% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

{{ my_array | sort_natural | join: ", " }}
+
{% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}
+
+{{ my_array | sort_natural | join: ", " }}

Output

-


giraffe, octopus, Sally Snake, zebra
+

+
+giraffe, octopus, Sally Snake, zebra

An optional argument specifies which property of the array’s items to use for sorting.

-
{% assign products_by_company = collection.products | sort_natural: "company" %}
{% for product in products_by_company %}
<h4>{{ product.title }}</h4>
{% endfor %}
+
{% assign products_by_company = collection.products | sort_natural: "company" %}
+{% for product in products_by_company %}
+  <h4>{{ product.title }}</h4>
+{% endfor %}
diff --git a/filters/split.html b/filters/split.html index c7edf8023..15f314ee6 100644 --- a/filters/split.html +++ b/filters/split.html @@ -95,14 +95,28 @@

Divides a string into an array using the argument as a separator. split is commonly used to convert comma-separated items from a string to an array.

Input

-
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

{% for member in beatles %}
{{ member }}
{% endfor %}
+
{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
+
+{% for member in beatles %}
+  {{ member }}
+{% endfor %}

Output

-




John

Paul

George

Ringo
+

+
+
+
+John
+
+Paul
+
+George
+
+Ringo
diff --git a/filters/strip.html b/filters/strip.html index 67c26babe..be6f83ace 100644 --- a/filters/strip.html +++ b/filters/strip.html @@ -95,14 +95,14 @@

Removes all whitespace (tabs, spaces, and newlines) from both the left and right sides of a string. It does not affect spaces between words.

Input

-
BEGIN{{ "          So much room for activities!          " | strip }}END
+
BEGIN{{ "          So much room for activities!          " | strip }}END

Output

-
BEGINSo much room for activities!END
+
BEGINSo much room for activities!END
diff --git a/filters/strip_html.html b/filters/strip_html.html index bb08bea37..eb3a80e09 100644 --- a/filters/strip_html.html +++ b/filters/strip_html.html @@ -95,14 +95,14 @@

Removes any HTML tags from a string.

Input

-
{{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}
+
{{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}

Output

-
Have you read Ulysses?
+
Have you read Ulysses?
diff --git a/filters/strip_newlines.html b/filters/strip_newlines.html index c440ef8db..a67854dbe 100644 --- a/filters/strip_newlines.html +++ b/filters/strip_newlines.html @@ -95,14 +95,20 @@

Removes any newline characters (line breaks) from a string.

Input

-
{% capture string_with_newlines %}
Hello
there
{% endcapture %}

{{ string_with_newlines | strip_newlines }}
+
{% capture string_with_newlines %}
+Hello
+there
+{% endcapture %}
+
+{{ string_with_newlines | strip_newlines }}

Output

-

Hellothere
+

+Hellothere
diff --git a/filters/times.html b/filters/times.html index 79ae29c8d..e2cf78a0b 100644 --- a/filters/times.html +++ b/filters/times.html @@ -95,26 +95,26 @@

Multiplies a number by another number.

Input

-
{{ 3 | times: 2 }}
+
{{ 3 | times: 2 }}

Output

-
6
+
6

Input

-
{{ 24 | times: 7 }}
+
{{ 24 | times: 7 }}

Output

-
168
+
168

Input

-
{{ 183.357 | times: 12 }}
+
{{ 183.357 | times: 12 }}

Output

-
2200.284
+
2200.284
diff --git a/filters/truncate.html b/filters/truncate.html index 27c0c61f6..9d1161cfd 100644 --- a/filters/truncate.html +++ b/filters/truncate.html @@ -95,29 +95,29 @@

Shortens a string down to the number of characters passed as an argument. If the specified number of characters is less than the length of the string, an ellipsis (…) is appended to the string and is included in the character count.

Basic Usage

Input

-
{{ "Ground control to Major Tom." | truncate: 20 }}
+
{{ "Ground control to Major Tom." | truncate: 20 }}

Output

-
Ground control to...
+
Ground control to...

Custom ellipsis

truncate takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (…), but you can specify a different sequence.

The length of the second argument counts against the number of characters specified by the first argument. For example, if you want to truncate a string to exactly 10 characters, and use a 3-character ellipsis, use 13 for the first argument of truncate, since the ellipsis counts as 3 characters.

Input

-
{{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}
+
{{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}

Output

-
Ground control, and so on
+
Ground control, and so on

No ellipsis

You can truncate to the exact number of characters specified by the first argument and avoid showing trailing characters by passing a blank string as the second argument:

Input

-
{{ "Ground control to Major Tom." | truncate: 20, "" }}
+
{{ "Ground control to Major Tom." | truncate: 20, "" }}

Output

-
Ground control to Ma
+
Ground control to Ma
diff --git a/filters/truncatewords.html b/filters/truncatewords.html index 5c8556d6b..0b53b0d1d 100644 --- a/filters/truncatewords.html +++ b/filters/truncatewords.html @@ -95,28 +95,28 @@

Shortens a string down to the number of words passed as an argument. If the specified number of words is less than the number of words in the string, an ellipsis (…) is appended to the string.

Input

-
{{ "Ground control to Major Tom." | truncatewords: 3 }}
+
{{ "Ground control to Major Tom." | truncatewords: 3 }}

Output

-
Ground control to...
+
Ground control to...

Custom ellipsis

truncatewords takes an optional second argument that specifies the sequence of characters to be appended to the truncated string. By default this is an ellipsis (…), but you can specify a different sequence.

Input

-
{{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
+
{{ "Ground control to Major Tom." | truncatewords: 3, "--" }}

Output

-
Ground control to--
+
Ground control to--

No ellipsis

You can avoid showing trailing characters by passing a blank string as the second argument:

Input

-
{{ "Ground control to Major Tom." | truncatewords: 3, "" }}
+
{{ "Ground control to Major Tom." | truncatewords: 3, "" }}

Output

-
Ground control to
+
Ground control to
diff --git a/filters/uniq.html b/filters/uniq.html index 57bf7b854..fc2c4603f 100644 --- a/filters/uniq.html +++ b/filters/uniq.html @@ -95,7 +95,8 @@

Removes any duplicate elements in an array.

Input

-
{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }}
+
{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
+{{ my_array | uniq | join: ", " }}

Output


@@ -103,7 +104,7 @@ ants, bugs, bees```
diff --git a/filters/upcase.html b/filters/upcase.html index 6243aed91..c4b14405a 100644 --- a/filters/upcase.html +++ b/filters/upcase.html @@ -95,20 +95,20 @@

Makes each character in a string uppercase. It has no effect on strings which are already all uppercase.

Input

-
{{ "Parker Moore" | upcase }}
+
{{ "Parker Moore" | upcase }}

Output

-
PARKER MOORE
+
PARKER MOORE

Input

-
{{ "APPLE" | upcase }}
+
{{ "APPLE" | upcase }}

Output

-
APPLE
+
APPLE
diff --git a/filters/url_decode.html b/filters/url_decode.html index b732fc6df..382cd8f6b 100644 --- a/filters/url_decode.html +++ b/filters/url_decode.html @@ -95,14 +95,14 @@

Decodes a string that has been encoded as a URL.

Input

-
{{ "%27Stop%21%27+said+Fred" | url_decode }}
+
{{ "%27Stop%21%27+said+Fred" | url_decode }}

Output

-
'Stop!' said Fred
+
'Stop!' said Fred
diff --git a/filters/url_encode.html b/filters/url_encode.html index bf5c02570..dcd4e6ac6 100644 --- a/filters/url_encode.html +++ b/filters/url_encode.html @@ -95,20 +95,20 @@

Converts any URL-unsafe characters in a string into percent-encoded characters.

Input

-
{{ "john@liquid.com" | url_encode }}
+
{{ "john@liquid.com" | url_encode }}

Output

-
john%40liquid.com
+
john%40liquid.com

Input

-
{{ "Tetsuro Takara" | url_encode }}
+
{{ "Tetsuro Takara" | url_encode }}

Output

-
Tetsuro+Takara
+
Tetsuro+Takara
diff --git a/filters/where.html b/filters/where.html index 3dafd70c8..41a146fbf 100644 --- a/filters/where.html +++ b/filters/where.html @@ -96,29 +96,66 @@

Creates an array including only the objects with a given property value, or any truthy value by default.

In this example, assume you have a list of products and you want to show your kitchen products separately. Using where, you can create an array containing only the products that have a "type" of "kitchen".

Input

-
All products:
{% for product in products %}
- {{ product.title }}
{% endfor %}

{% assign kitchen_products = products | where: "type", "kitchen" %}

Kitchen products:
{% for product in kitchen_products %}
- {{ product.title }}
{% endfor %}
+
All products:
+{% for product in products %}
+- {{ product.title }}
+{% endfor %}
+
+{% assign kitchen_products = products | where: "type", "kitchen" %}
+
+Kitchen products:
+{% for product in kitchen_products %}
+- {{ product.title }}
+{% endfor %}

Output

-
All products:
- Vacuum
- Spatula
- Television
- Garlic press

Kitchen products:
- Spatula
- Garlic press
+
All products:
+- Vacuum
+- Spatula
+- Television
+- Garlic press
+
+Kitchen products:
+- Spatula
+- Garlic press

Say instead you have a list of products and you only want to show those that are available to buy. You can where with a property name but no target value to include all products with a truthy "available" value.

Input

-
All products:
{% for product in products %}
- {{ product.title }}
{% endfor %}

{% assign available_products = products | where: "available" %}

Available products:
{% for product in available_products %}
- {{ product.title }}
{% endfor %}
+
All products:
+{% for product in products %}
+- {{ product.title }}
+{% endfor %}
+
+{% assign available_products = products | where: "available" %}
+
+Available products:
+{% for product in available_products %}
+- {{ product.title }}
+{% endfor %}

Output

-
All products:
- Coffee mug
- Limited edition sneakers
- Boring sneakers

Available products:
- Coffee mug
- Boring sneakers
+
All products:
+- Coffee mug
+- Limited edition sneakers
+- Boring sneakers
+
+Available products:
+- Coffee mug
+- Boring sneakers

The where filter can also be used to find a single object in an array when combined with the first filter. For example, say you want to show off the shirt in your new fall collection.

Input

-
{% assign new_shirt = products | where: "type", "shirt" | first %}

Featured product: {{ new_shirt.title }}
+
{% assign new_shirt = products | where: "type", "shirt" | first %}
+
+Featured product: {{ new_shirt.title }}

Output

-
Featured product: Hawaiian print sweater vest
+
Featured product: Hawaiian print sweater vest
diff --git a/sitemap.xml b/sitemap.xml index b4ab3a582..4968f1c9c 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,3860 +1,3874 @@ - - https://liquidjs.com/zh-cn/tutorials/changelog - - 2022-01-22T16:03:36.413Z - - - https://liquidjs.com/tutorials/changelog - 2022-01-22T16:03:36.409Z + 2022-01-23T06:26:10.777Z - https://liquidjs.com/zh-cn/api/classes/drop_null_drop_.nulldrop + https://liquidjs.com/zh-cn/tutorials/changelog - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/emitters_streamed_emitter_browser_.streamedemitter - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/template_filter_filter_map_.filtermap - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/template_html_.html - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/template_output_.output - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/template_tag_tag_.tag - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/template_template_impl_.templateimpl - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/tokens_hash_token_.hashtoken - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/tokens_quoted_token_.quotedtoken - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/tokens_range_token_.rangetoken - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/util_error_.assertionerror - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/classes/util_error_.internalundefinedvariableerror - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/enums/context_block_mode_.blockmode - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/enums/fs_loader_.lookuptype - - 2022-01-22T16:03:36.397Z - - - - - https://liquidjs.com/zh-cn/api/enums/parser_token_kind_.tokenkind - - 2022-01-22T16:03:36.397Z + 2022-01-23T06:26:10.777Z https://liquidjs.com/zh-cn/api/globals - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/cache_lru_.lru - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/cache_lru_.node - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/context_context_.context - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/drop_blank_drop_.blankdrop - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/drop_block_drop_.blockdrop - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/drop_drop_.drop - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/drop_empty_drop_.emptydrop - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/drop_forloop_drop_.forloopdrop - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/drop_null_drop_.nulldrop + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/emitters_streamed_emitter_browser_.streamedemitter + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/fs_loader_.loader - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/liquid_.liquid - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/parser_parse_stream_.parsestream - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/parser_parser_.parser - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/parser_tokenizer_.tokenizer - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/render_expression_.expression - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/render_render_.render - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/template_filter_filter_.filter - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/template_filter_filter_map_.filtermap + + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/template_html_.html + + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/template_output_.output + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/template_tag_hash_.hash - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/template_tag_tag_.tag + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/template_tag_tag_map_.tagmap - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/template_template_impl_.templateimpl + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/template_value_.value - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_filter_token_.filtertoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/tokens_hash_token_.hashtoken + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_html_token_.htmltoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_identifier_token_.identifiertoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_liquid_tag_token_.liquidtagtoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_literal_token_.literaltoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_number_token_.numbertoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_operator_token_.operatortoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_output_token_.outputtoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/tokens_quoted_token_.quotedtoken + + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/tokens_range_token_.rangetoken + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_tag_token_.tagtoken - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/tokens_token_.token - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/util_error_.assertionerror + + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/classes/util_error_.internalundefinedvariableerror + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/util_error_.liquiderror - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/util_error_.parseerror - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/util_error_.rendererror - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/util_error_.tokenizationerror - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/util_error_.undefinedvariableerror - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/classes/util_timezone_date_.timezonedate - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/enums/context_block_mode_.blockmode + + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/enums/fs_loader_.lookuptype + + 2022-01-23T06:26:10.761Z + + + + + https://liquidjs.com/zh-cn/api/enums/parser_token_kind_.tokenkind + + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/cache_cache_.cache - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/context_scope_.plainobject - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/drop_comparable_.comparable - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/emitters_emitter_.emitter - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/fs_fs_.fs - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/fs_loader_.loaderoptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/liquid_options_.liquidoptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/liquid_options_.normalizedoptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/liquid_options_.renderoptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/render_operator_.operators - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/template_tag_hash_.hashvalue - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/template_template_.template - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/util_async_.thenable - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/util_liquid_date_.liquiddate - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/util_operator_trie_.trie - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/interfaces/util_strftime_.formatoptions - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_filters_array_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_filters_html_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_filters_index_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_filters_math_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_filters_object_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_filters_string_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_filters_url_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_assign_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_block_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_break_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_capture_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_comment_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_decrement_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_echo_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_for_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_if_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_include_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_increment_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_index_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_layout_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_liquid_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_raw_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_render_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_tablerow_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/builtin_tags_unless_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/cache_cache_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/context_block_mode_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/context_context_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/drop_blank_drop_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/drop_block_drop_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/drop_comparable_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/drop_drop_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/drop_empty_drop_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/drop_forloop_drop_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/drop_null_drop_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/drop_tablerowloop_drop_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/emitters_emitter_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/emitters_keeping_type_emitter_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/emitters_simple_emitter_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/emitters_streamed_emitter_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/emitters_streamed_emitter_browser_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/fs_node_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/liquid_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/liquid_options_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/parser_filter_arg_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/parser_match_operator_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/parser_parse_stream_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/parser_parse_string_literal_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/parser_whitespace_ctrl_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/render_boolean_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/render_expression_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/render_operator_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_filter_filter_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/template_filter_filter_impl_options_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_tag_hash_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/template_tag_tag_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_tag_tag_impl_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_tag_tag_impl_options_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_tag_tag_map_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/template_template_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_template_impl_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/template_value_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_delimited_token_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_filter_token_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_hash_token_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_html_token_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_identifier_token_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_literal_token_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_number_token_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_operator_token_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_output_token_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_property_access_token_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_quoted_token_ - - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_range_token_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_tag_token_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_token_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/tokens_toplevel_token_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/tokens_value_token_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/types_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_assert_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/util_async_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_character_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/util_collection_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_liquid_date_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_literal_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/zh-cn/api/modules/util_strftime_ - - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_timezone_date_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_type_guards_ - 2022-01-22T16:03:36.393Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/util_underscore_ - 2022-01-22T16:03:36.393Z - - - - - https://liquidjs.com/api/classes/template_output_.output - - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.761Z https://liquidjs.com/zh-cn/api/modules/builtin_filters_date_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_filters_html_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_filters_object_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_filters_string_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_assign_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_block_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_case_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_comment_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_continue_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/builtin_tags_cycle_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_decrement_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_echo_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_if_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_increment_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_index_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_layout_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_liquid_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_raw_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_render_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_tablerow_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/builtin_tags_unless_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/cache_lru_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/context_context_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/context_scope_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/drop_block_drop_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/drop_empty_drop_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/drop_forloop_drop_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/drop_null_drop_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/emitters_keeping_type_emitter_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/emitters_streamed_emitter_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/emitters_streamed_emitter_browser_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/fs_browser_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/fs_fs_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/fs_loader_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/fs_node_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/liquid_options_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/parser_filter_arg_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/parser_parse_stream_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/parser_parser_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/parser_token_kind_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/parser_tokenizer_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/render_boolean_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/render_operator_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/render_render_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_filter_filter_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/template_filter_filter_impl_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/template_filter_filter_map_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/template_html_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/template_output_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_tag_hash_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_tag_tag_impl_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_tag_tag_impl_options_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_tag_tag_map_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_template_impl_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/template_value_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_html_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_identifier_token_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/tokens_liquid_tag_token_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_literal_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_output_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_property_access_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_quoted_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_range_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/tokens_value_token_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/util_async_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/util_collection_ + + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/util_error_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z https://liquidjs.com/zh-cn/api/modules/util_operator_trie_ - 2022-01-22T16:03:36.389Z + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/zh-cn/api/modules/util_strftime_ + + 2022-01-23T06:26:10.757Z + + + + + https://liquidjs.com/api/classes/template_output_.output + + 2022-01-23T06:26:10.753Z https://liquidjs.com/api/classes/util_error_.liquiderror - 2022-01-22T16:03:36.385Z + 2022-01-23T06:26:10.749Z https://liquidjs.com/api/classes/render_expression_.expression - 2022-01-22T16:03:36.381Z + 2022-01-23T06:26:10.745Z https://liquidjs.com/api/classes/tokens_html_token_.htmltoken - 2022-01-22T16:03:36.377Z + 2022-01-23T06:26:10.741Z https://liquidjs.com/api/classes/emitters_streamed_emitter_browser_.streamedemitter - 2022-01-22T16:03:36.369Z - - - - - https://liquidjs.com/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter - - 2022-01-22T16:03:36.365Z + 2022-01-23T06:26:10.737Z https://liquidjs.com/api/classes/util_error_.undefinedvariableerror - 2022-01-22T16:03:36.365Z + 2022-01-23T06:26:10.733Z + + + + + https://liquidjs.com/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter + + 2022-01-23T06:26:10.729Z https://liquidjs.com/api/classes/fs_loader_.loader - 2022-01-22T16:03:36.361Z + 2022-01-23T06:26:10.725Z https://liquidjs.com/api/classes/parser_parse_stream_.parsestream - 2022-01-22T16:03:36.357Z - - - - - https://liquidjs.com/api/classes/template_value_.value - - 2022-01-22T16:03:36.353Z + 2022-01-23T06:26:10.721Z https://liquidjs.com/api/classes/parser_parser_.parser - 2022-01-22T16:03:36.345Z + 2022-01-23T06:26:10.717Z + + + + + https://liquidjs.com/api/classes/template_value_.value + + 2022-01-23T06:26:10.717Z https://liquidjs.com/api/classes/tokens_property_access_token_.propertyaccesstoken - 2022-01-22T16:03:36.341Z + 2022-01-23T06:26:10.709Z https://liquidjs.com/api/classes/drop_tablerowloop_drop_.tablerowloopdrop - 2022-01-22T16:03:36.337Z + 2022-01-23T06:26:10.705Z https://liquidjs.com/api/classes/liquid_.liquid - 2022-01-22T16:03:36.333Z + 2022-01-23T06:26:10.701Z https://liquidjs.com/api/classes/tokens_literal_token_.literaltoken - 2022-01-22T16:03:36.329Z + 2022-01-23T06:26:10.697Z https://liquidjs.com/api/classes/cache_lru_.node - 2022-01-22T16:03:36.325Z + 2022-01-23T06:26:10.693Z https://liquidjs.com/api/classes/tokens_delimited_token_.delimitedtoken - 2022-01-22T16:03:36.321Z + 2022-01-23T06:26:10.689Z https://liquidjs.com/api/classes/template_filter_filter_map_.filtermap - 2022-01-22T16:03:36.317Z + 2022-01-23T06:26:10.685Z https://liquidjs.com/api/classes/util_error_.parseerror - 2022-01-22T16:03:36.313Z + 2022-01-23T06:26:10.681Z https://liquidjs.com/api/classes/tokens_operator_token_.operatortoken - 2022-01-22T16:03:36.309Z + 2022-01-23T06:26:10.677Z https://liquidjs.com/api/classes/drop_forloop_drop_.forloopdrop - 2022-01-22T16:03:36.305Z + 2022-01-23T06:26:10.673Z https://liquidjs.com/api/classes/drop_drop_.drop - 2022-01-22T16:03:36.301Z + 2022-01-23T06:26:10.669Z https://liquidjs.com/api/classes/render_render_.render - 2022-01-22T16:03:36.297Z + 2022-01-23T06:26:10.665Z https://liquidjs.com/api/classes/cache_lru_.lru - 2022-01-22T16:03:36.293Z + 2022-01-23T06:26:10.661Z https://liquidjs.com/api/classes/template_filter_filter_.filter - 2022-01-22T16:03:36.289Z + 2022-01-23T06:26:10.657Z https://liquidjs.com/api/classes/drop_null_drop_.nulldrop - 2022-01-22T16:03:36.285Z + 2022-01-23T06:26:10.653Z https://liquidjs.com/api/classes/util_error_.tokenizationerror - 2022-01-22T16:03:36.281Z + 2022-01-23T06:26:10.649Z https://liquidjs.com/api/classes/tokens_output_token_.outputtoken - 2022-01-22T16:03:36.277Z + 2022-01-23T06:26:10.645Z https://liquidjs.com/api/classes/emitters_simple_emitter_.simpleemitter - 2022-01-22T16:03:36.273Z + 2022-01-23T06:26:10.641Z https://liquidjs.com/api/classes/template_html_.html - 2022-01-22T16:03:36.269Z + 2022-01-23T06:26:10.637Z https://liquidjs.com/api/classes/util_error_.rendererror - 2022-01-22T16:03:36.265Z + 2022-01-23T06:26:10.633Z https://liquidjs.com/api/classes/template_tag_hash_.hash - 2022-01-22T16:03:36.261Z + 2022-01-23T06:26:10.629Z https://liquidjs.com/api/classes/tokens_identifier_token_.identifiertoken - 2022-01-22T16:03:36.257Z + 2022-01-23T06:26:10.625Z https://liquidjs.com/api/classes/drop_blank_drop_.blankdrop - 2022-01-22T16:03:36.253Z + 2022-01-23T06:26:10.621Z https://liquidjs.com/api/classes/tokens_filter_token_.filtertoken - 2022-01-22T16:03:36.253Z + 2022-01-23T06:26:10.617Z https://liquidjs.com/api/classes/emitters_streamed_emitter_.streamedemitter - 2022-01-22T16:03:36.249Z + 2022-01-23T06:26:10.613Z https://liquidjs.com/api/classes/tokens_hash_token_.hashtoken - 2022-01-22T16:03:36.245Z + 2022-01-23T06:26:10.609Z https://liquidjs.com/api/classes/util_timezone_date_.timezonedate - 2022-01-22T16:03:36.241Z + 2022-01-23T06:26:10.605Z https://liquidjs.com/api/classes/tokens_number_token_.numbertoken - 2022-01-22T16:03:36.237Z + 2022-01-23T06:26:10.601Z https://liquidjs.com/api/classes/template_tag_tag_.tag - 2022-01-22T16:03:36.233Z + 2022-01-23T06:26:10.597Z https://liquidjs.com/api/classes/tokens_token_.token - 2022-01-22T16:03:36.229Z + 2022-01-23T06:26:10.593Z https://liquidjs.com/api/classes/drop_block_drop_.blockdrop - 2022-01-22T16:03:36.225Z + 2022-01-23T06:26:10.589Z https://liquidjs.com/api/classes/context_context_.context - 2022-01-22T16:03:36.221Z + 2022-01-23T06:26:10.585Z https://liquidjs.com/api/classes/drop_empty_drop_.emptydrop - 2022-01-22T16:03:36.217Z + 2022-01-23T06:26:10.581Z https://liquidjs.com/api/classes/template_template_impl_.templateimpl - 2022-01-22T16:03:36.213Z + 2022-01-23T06:26:10.577Z https://liquidjs.com/api/classes/tokens_range_token_.rangetoken - 2022-01-22T16:03:36.209Z + 2022-01-23T06:26:10.573Z https://liquidjs.com/api/classes/util_error_.internalundefinedvariableerror - 2022-01-22T16:03:36.205Z + 2022-01-23T06:26:10.569Z https://liquidjs.com/api/classes/tokens_quoted_token_.quotedtoken - 2022-01-22T16:03:36.201Z + 2022-01-23T06:26:10.565Z https://liquidjs.com/api/classes/util_error_.assertionerror - 2022-01-22T16:03:36.197Z + 2022-01-23T06:26:10.561Z https://liquidjs.com/api/classes/tokens_tag_token_.tagtoken - 2022-01-22T16:03:36.193Z + 2022-01-23T06:26:10.557Z https://liquidjs.com/api/classes/template_tag_tag_map_.tagmap - 2022-01-22T16:03:36.189Z + 2022-01-23T06:26:10.553Z https://liquidjs.com/api/classes/tokens_liquid_tag_token_.liquidtagtoken - 2022-01-22T16:03:36.185Z + 2022-01-23T06:26:10.549Z https://liquidjs.com/api/classes/parser_tokenizer_.tokenizer - 2022-01-22T16:03:36.181Z + 2022-01-23T06:26:10.545Z https://liquidjs.com/api/globals - 2022-01-22T16:03:36.177Z + 2022-01-23T06:26:10.541Z https://liquidjs.com/api/enums/context_block_mode_.blockmode - 2022-01-22T16:03:36.173Z + 2022-01-23T06:26:10.537Z https://liquidjs.com/api/enums/parser_token_kind_.tokenkind - 2022-01-22T16:03:36.169Z + 2022-01-23T06:26:10.533Z https://liquidjs.com/api/enums/fs_loader_.lookuptype - 2022-01-22T16:03:36.165Z + 2022-01-23T06:26:10.529Z https://liquidjs.com/api/interfaces/template_tag_hash_.hashvalue - 2022-01-22T16:03:36.161Z + 2022-01-23T06:26:10.525Z https://liquidjs.com/api/interfaces/util_async_.thenable - 2022-01-22T16:03:36.157Z - - - - - https://liquidjs.com/api/interfaces/template_filter_filter_impl_options_.filterimploptions - - 2022-01-22T16:03:36.149Z + 2022-01-23T06:26:10.521Z https://liquidjs.com/api/interfaces/fs_fs_.fs - 2022-01-22T16:03:36.145Z + 2022-01-23T06:26:10.517Z + + + + + https://liquidjs.com/api/interfaces/template_filter_filter_impl_options_.filterimploptions + + 2022-01-23T06:26:10.517Z https://liquidjs.com/api/interfaces/liquid_options_.liquidoptions - 2022-01-22T16:03:36.141Z + 2022-01-23T06:26:10.513Z https://liquidjs.com/api/interfaces/context_scope_.plainobject - 2022-01-22T16:03:36.137Z + 2022-01-23T06:26:10.505Z https://liquidjs.com/api/interfaces/template_tag_tag_impl_.tagimpl - 2022-01-22T16:03:36.133Z + 2022-01-23T06:26:10.501Z https://liquidjs.com/api/interfaces/template_filter_filter_impl_.filterimpl - 2022-01-22T16:03:36.129Z + 2022-01-23T06:26:10.497Z https://liquidjs.com/api/interfaces/util_liquid_date_.liquiddate - 2022-01-22T16:03:36.125Z - - - - - https://liquidjs.com/api/interfaces/emitters_emitter_.emitter - - 2022-01-22T16:03:36.121Z + 2022-01-23T06:26:10.493Z https://liquidjs.com/api/interfaces/liquid_options_.renderoptions - 2022-01-22T16:03:36.121Z + 2022-01-23T06:26:10.485Z + + + + + https://liquidjs.com/api/interfaces/emitters_emitter_.emitter + + 2022-01-23T06:26:10.481Z https://liquidjs.com/api/interfaces/fs_loader_.loaderoptions - 2022-01-22T16:03:36.117Z + 2022-01-23T06:26:10.477Z https://liquidjs.com/api/interfaces/drop_comparable_.comparable - 2022-01-22T16:03:36.113Z + 2022-01-23T06:26:10.473Z https://liquidjs.com/api/interfaces/liquid_options_.normalizedfulloptions - 2022-01-22T16:03:36.109Z + 2022-01-23T06:26:10.469Z https://liquidjs.com/api/interfaces/template_template_.template - 2022-01-22T16:03:36.105Z + 2022-01-23T06:26:10.465Z https://liquidjs.com/api/interfaces/util_strftime_.formatoptions - 2022-01-22T16:03:36.097Z + 2022-01-23T06:26:10.461Z https://liquidjs.com/api/interfaces/cache_cache_.cache - 2022-01-22T16:03:36.093Z + 2022-01-23T06:26:10.457Z https://liquidjs.com/api/interfaces/render_operator_.operators - 2022-01-22T16:03:36.093Z + 2022-01-23T06:26:10.457Z https://liquidjs.com/api/interfaces/template_tag_tag_impl_options_.tagimploptions - 2022-01-22T16:03:36.089Z + 2022-01-23T06:26:10.453Z https://liquidjs.com/api/interfaces/liquid_options_.normalizedoptions - 2022-01-22T16:03:36.081Z + 2022-01-23T06:26:10.449Z https://liquidjs.com/api/interfaces/util_operator_trie_.trie - 2022-01-22T16:03:36.077Z + 2022-01-23T06:26:10.441Z https://liquidjs.com/api/modules/util_error_ - 2022-01-22T16:03:36.073Z + 2022-01-23T06:26:10.441Z https://liquidjs.com/api/modules/builtin_tags_comment_ - 2022-01-22T16:03:36.069Z + 2022-01-23T06:26:10.437Z https://liquidjs.com/api/modules/builtin_tags_if_ - 2022-01-22T16:03:36.065Z + 2022-01-23T06:26:10.433Z https://liquidjs.com/api/modules/template_filter_filter_impl_options_ - 2022-01-22T16:03:36.061Z + 2022-01-23T06:26:10.429Z https://liquidjs.com/api/modules/template_html_ - 2022-01-22T16:03:36.057Z + 2022-01-23T06:26:10.425Z https://liquidjs.com/api/modules/builtin_filters_html_ - 2022-01-22T16:03:36.053Z + 2022-01-23T06:26:10.421Z https://liquidjs.com/api/modules/drop_empty_drop_ - 2022-01-22T16:03:36.049Z + 2022-01-23T06:26:10.417Z https://liquidjs.com/api/modules/emitters_streamed_emitter_browser_ - 2022-01-22T16:03:36.045Z + 2022-01-23T06:26:10.417Z https://liquidjs.com/api/modules/builtin_tags_increment_ - 2022-01-22T16:03:36.041Z + 2022-01-23T06:26:10.413Z https://liquidjs.com/api/modules/builtin_tags_raw_ - 2022-01-22T16:03:36.041Z + 2022-01-23T06:26:10.409Z https://liquidjs.com/api/modules/parser_parse_string_literal_ - 2022-01-22T16:03:36.037Z + 2022-01-23T06:26:10.405Z https://liquidjs.com/api/modules/tokens_value_token_ - 2022-01-22T16:03:36.033Z + 2022-01-23T06:26:10.401Z https://liquidjs.com/api/modules/fs_fs_ - 2022-01-22T16:03:36.029Z + 2022-01-23T06:26:10.397Z https://liquidjs.com/api/modules/builtin_filters_url_ - 2022-01-22T16:03:36.025Z + 2022-01-23T06:26:10.393Z https://liquidjs.com/api/modules/util_assert_ - 2022-01-22T16:03:36.021Z + 2022-01-23T06:26:10.393Z https://liquidjs.com/api/modules/template_tag_tag_map_ - 2022-01-22T16:03:36.017Z + 2022-01-23T06:26:10.389Z https://liquidjs.com/api/modules/context_context_ - 2022-01-22T16:03:36.013Z + 2022-01-23T06:26:10.385Z https://liquidjs.com/api/modules/cache_cache_ - 2022-01-22T16:03:36.009Z + 2022-01-23T06:26:10.381Z https://liquidjs.com/api/modules/util_async_ - 2022-01-22T16:03:36.005Z + 2022-01-23T06:26:10.377Z https://liquidjs.com/api/modules/builtin_tags_index_ - 2022-01-22T16:03:36.001Z + 2022-01-23T06:26:10.373Z https://liquidjs.com/api/modules/emitters_streamed_emitter_ - 2022-01-22T16:03:35.997Z + 2022-01-23T06:26:10.369Z https://liquidjs.com/api/modules/emitters_keeping_type_emitter_ - 2022-01-22T16:03:35.993Z + 2022-01-23T06:26:10.365Z https://liquidjs.com/api/modules/drop_forloop_drop_ - 2022-01-22T16:03:35.985Z + 2022-01-23T06:26:10.361Z https://liquidjs.com/api/modules/render_expression_ - 2022-01-22T16:03:35.981Z - - - - - https://liquidjs.com/api/modules/util_character_ - - 2022-01-22T16:03:35.977Z + 2022-01-23T06:26:10.357Z https://liquidjs.com/api/modules/util_literal_ - 2022-01-22T16:03:35.977Z + 2022-01-23T06:26:10.353Z - https://liquidjs.com/api/modules/template_tag_hash_ + https://liquidjs.com/api/modules/util_character_ - 2022-01-22T16:03:35.969Z - - - - - https://liquidjs.com/api/modules/builtin_tags_cycle_ - - 2022-01-22T16:03:35.965Z + 2022-01-23T06:26:10.349Z https://liquidjs.com/api/modules/template_filter_filter_map_ - 2022-01-22T16:03:35.965Z + 2022-01-23T06:26:10.345Z + + + + + https://liquidjs.com/api/modules/template_tag_hash_ + + 2022-01-23T06:26:10.345Z + + + + + https://liquidjs.com/api/modules/builtin_tags_cycle_ + + 2022-01-23T06:26:10.341Z https://liquidjs.com/api/modules/builtin_filters_date_ - 2022-01-22T16:03:35.961Z + 2022-01-23T06:26:10.337Z https://liquidjs.com/api/modules/builtin_tags_case_ - 2022-01-22T16:03:35.953Z + 2022-01-23T06:26:10.333Z https://liquidjs.com/api/modules/builtin_tags_capture_ - 2022-01-22T16:03:35.949Z + 2022-01-23T06:26:10.329Z https://liquidjs.com/api/modules/tokens_quoted_token_ - 2022-01-22T16:03:35.945Z - - - - - https://liquidjs.com/api/modules/builtin_filters_index_ - - 2022-01-22T16:03:35.941Z + 2022-01-23T06:26:10.325Z https://liquidjs.com/api/modules/parser_token_kind_ - 2022-01-22T16:03:35.941Z + 2022-01-23T06:26:10.321Z + + + + + https://liquidjs.com/api/modules/builtin_filters_index_ + + 2022-01-23T06:26:10.309Z https://liquidjs.com/api/modules/tokens_range_token_ - 2022-01-22T16:03:35.937Z + 2022-01-23T06:26:10.305Z https://liquidjs.com/api/modules/context_block_mode_ - 2022-01-22T16:03:35.933Z - - - - - https://liquidjs.com/api/modules/drop_blank_drop_ - - 2022-01-22T16:03:35.929Z + 2022-01-23T06:26:10.301Z https://liquidjs.com/api/modules/util_collection_ - 2022-01-22T16:03:35.929Z + 2022-01-23T06:26:10.297Z - https://liquidjs.com/api/modules/template_template_ + https://liquidjs.com/api/modules/drop_blank_drop_ - 2022-01-22T16:03:35.917Z + 2022-01-23T06:26:10.293Z https://liquidjs.com/api/modules/tokens_tag_token_ - 2022-01-22T16:03:35.917Z + 2022-01-23T06:26:10.289Z + + + + + https://liquidjs.com/api/modules/template_template_ + + 2022-01-23T06:26:10.285Z https://liquidjs.com/api/modules/util_type_guards_ - 2022-01-22T16:03:35.913Z + 2022-01-23T06:26:10.281Z https://liquidjs.com/api/modules/tokens_operator_token_ - 2022-01-22T16:03:35.909Z + 2022-01-23T06:26:10.277Z https://liquidjs.com/api/modules/util_operator_trie_ - 2022-01-22T16:03:35.905Z + 2022-01-23T06:26:10.273Z https://liquidjs.com/api/modules/builtin_filters_object_ - 2022-01-22T16:03:35.901Z - - - - - https://liquidjs.com/api/modules/fs_browser_ - - 2022-01-22T16:03:35.897Z + 2022-01-23T06:26:10.269Z https://liquidjs.com/api/modules/builtin_tags_assign_ - 2022-01-22T16:03:35.893Z + 2022-01-23T06:26:10.265Z + + + + + https://liquidjs.com/api/modules/fs_browser_ + + 2022-01-23T06:26:10.265Z https://liquidjs.com/api/modules/render_boolean_ - 2022-01-22T16:03:35.889Z + 2022-01-23T06:26:10.261Z https://liquidjs.com/api/modules/context_scope_ - 2022-01-22T16:03:35.885Z + 2022-01-23T06:26:10.257Z https://liquidjs.com/api/modules/builtin_tags_block_ - 2022-01-22T16:03:35.881Z + 2022-01-23T06:26:10.253Z https://liquidjs.com/api/modules/builtin_tags_unless_ - 2022-01-22T16:03:35.881Z + 2022-01-23T06:26:10.249Z https://liquidjs.com/api/modules/builtin_tags_layout_ - 2022-01-22T16:03:35.877Z + 2022-01-23T06:26:10.245Z https://liquidjs.com/api/modules/parser_filter_arg_ - 2022-01-22T16:03:35.873Z + 2022-01-23T06:26:10.241Z https://liquidjs.com/api/modules/emitters_emitter_ - 2022-01-22T16:03:35.869Z + 2022-01-23T06:26:10.237Z https://liquidjs.com/api/modules/util_timezone_date_ - 2022-01-22T16:03:35.865Z - - - - - https://liquidjs.com/api/modules/drop_drop_ - - 2022-01-22T16:03:35.861Z + 2022-01-23T06:26:10.237Z https://liquidjs.com/api/modules/template_tag_tag_impl_options_ - 2022-01-22T16:03:35.861Z + 2022-01-23T06:26:10.233Z + + + + + https://liquidjs.com/api/modules/drop_drop_ + + 2022-01-23T06:26:10.229Z https://liquidjs.com/api/modules/util_strftime_ - 2022-01-22T16:03:35.857Z + 2022-01-23T06:26:10.225Z https://liquidjs.com/api/modules/builtin_tags_liquid_ - 2022-01-22T16:03:35.849Z + 2022-01-23T06:26:10.217Z https://liquidjs.com/api/modules/drop_block_drop_ - 2022-01-22T16:03:35.845Z + 2022-01-23T06:26:10.217Z https://liquidjs.com/api/modules/parser_parse_stream_ - 2022-01-22T16:03:35.841Z + 2022-01-23T06:26:10.213Z https://liquidjs.com/api/modules/builtin_tags_render_ - 2022-01-22T16:03:35.837Z + 2022-01-23T06:26:10.209Z https://liquidjs.com/api/modules/fs_node_ - 2022-01-22T16:03:35.833Z + 2022-01-23T06:26:10.205Z https://liquidjs.com/api/modules/liquid_options_ - 2022-01-22T16:03:35.829Z + 2022-01-23T06:26:10.201Z https://liquidjs.com/api/modules/builtin_tags_include_ - 2022-01-22T16:03:35.825Z - - - - - https://liquidjs.com/api/modules/builtin_tags_tablerow_ - - 2022-01-22T16:03:35.821Z + 2022-01-23T06:26:10.197Z https://liquidjs.com/api/modules/tokens_html_token_ - 2022-01-22T16:03:35.821Z + 2022-01-23T06:26:10.193Z + + + + + https://liquidjs.com/api/modules/builtin_tags_tablerow_ + + 2022-01-23T06:26:10.189Z https://liquidjs.com/api/modules/render_operator_ - 2022-01-22T16:03:35.817Z + 2022-01-23T06:26:10.185Z https://liquidjs.com/api/modules/emitters_simple_emitter_ - 2022-01-22T16:03:35.813Z + 2022-01-23T06:26:10.181Z https://liquidjs.com/api/modules/tokens_identifier_token_ - 2022-01-22T16:03:35.809Z + 2022-01-23T06:26:10.177Z https://liquidjs.com/api/modules/parser_parser_ - 2022-01-22T16:03:35.805Z + 2022-01-23T06:26:10.173Z https://liquidjs.com/api/modules/builtin_filters_string_ - 2022-01-22T16:03:35.801Z + 2022-01-23T06:26:10.169Z https://liquidjs.com/api/modules/parser_whitespace_ctrl_ - 2022-01-22T16:03:35.789Z + 2022-01-23T06:26:10.165Z https://liquidjs.com/api/modules/tokens_toplevel_token_ - 2022-01-22T16:03:35.785Z - - - - - https://liquidjs.com/api/modules/builtin_tags_break_ - - 2022-01-22T16:03:35.781Z + 2022-01-23T06:26:10.161Z https://liquidjs.com/api/modules/tokens_liquid_tag_token_ - 2022-01-22T16:03:35.781Z + 2022-01-23T06:26:10.157Z - https://liquidjs.com/api/modules/tokens_output_token_ + https://liquidjs.com/api/modules/builtin_tags_break_ - 2022-01-22T16:03:35.777Z + 2022-01-23T06:26:10.153Z https://liquidjs.com/api/modules/cache_lru_ - 2022-01-22T16:03:35.773Z + 2022-01-23T06:26:10.149Z + + + + + https://liquidjs.com/api/modules/tokens_output_token_ + + 2022-01-23T06:26:10.149Z https://liquidjs.com/api/modules/builtin_tags_continue_ - 2022-01-22T16:03:35.769Z + 2022-01-23T06:26:10.145Z https://liquidjs.com/api/modules/builtin_tags_echo_ - 2022-01-22T16:03:35.765Z + 2022-01-23T06:26:10.141Z https://liquidjs.com/api/modules/template_filter_filter_impl_ - 2022-01-22T16:03:35.765Z + 2022-01-23T06:26:10.137Z https://liquidjs.com/api/modules/builtin_tags_decrement_ - 2022-01-22T16:03:35.761Z + 2022-01-23T06:26:10.133Z https://liquidjs.com/api/modules/drop_null_drop_ - 2022-01-22T16:03:35.757Z + 2022-01-23T06:26:10.129Z https://liquidjs.com/api/modules/fs_loader_ - 2022-01-22T16:03:35.753Z + 2022-01-23T06:26:10.129Z https://liquidjs.com/api/modules/builtin_tags_for_ - 2022-01-22T16:03:35.749Z + 2022-01-23T06:26:10.125Z https://liquidjs.com/api/modules/template_tag_tag_impl_ - 2022-01-22T16:03:35.745Z - - - - - https://liquidjs.com/api/modules/builtin_filters_array_ - - 2022-01-22T16:03:35.741Z + 2022-01-23T06:26:10.121Z https://liquidjs.com/api/modules/parser_tokenizer_ - 2022-01-22T16:03:35.741Z + 2022-01-23T06:26:10.117Z + + + + + https://liquidjs.com/api/modules/builtin_filters_array_ + + 2022-01-23T06:26:10.113Z https://liquidjs.com/api/modules/tokens_filter_token_ - 2022-01-22T16:03:35.737Z + 2022-01-23T06:26:10.109Z https://liquidjs.com/api/modules/util_underscore_ - 2022-01-22T16:03:35.733Z + 2022-01-23T06:26:10.105Z https://liquidjs.com/api/modules/util_liquid_date_ - 2022-01-22T16:03:35.729Z + 2022-01-23T06:26:10.101Z https://liquidjs.com/api/modules/tokens_delimited_token_ - 2022-01-22T16:03:35.725Z + 2022-01-23T06:26:10.097Z https://liquidjs.com/api/modules/template_tag_tag_ - 2022-01-22T16:03:35.721Z - - - - - https://liquidjs.com/api/modules/template_template_impl_ - - 2022-01-22T16:03:35.717Z + 2022-01-23T06:26:10.093Z https://liquidjs.com/api/modules/tokens_number_token_ - 2022-01-22T16:03:35.717Z + 2022-01-23T06:26:10.089Z + + + + + https://liquidjs.com/api/modules/template_template_impl_ + + 2022-01-23T06:26:10.085Z https://liquidjs.com/api/modules/drop_tablerowloop_drop_ - 2022-01-22T16:03:35.713Z + 2022-01-23T06:26:10.081Z https://liquidjs.com/api/modules/types_ - 2022-01-22T16:03:35.709Z + 2022-01-23T06:26:10.077Z https://liquidjs.com/api/modules/tokens_literal_token_ - 2022-01-22T16:03:35.705Z + 2022-01-23T06:26:10.073Z https://liquidjs.com/api/modules/liquid_ - 2022-01-22T16:03:35.701Z + 2022-01-23T06:26:10.069Z https://liquidjs.com/api/modules/template_output_ - 2022-01-22T16:03:35.697Z + 2022-01-23T06:26:10.065Z https://liquidjs.com/api/modules/builtin_filters_math_ - 2022-01-22T16:03:35.693Z + 2022-01-23T06:26:10.061Z https://liquidjs.com/api/modules/tokens_property_access_token_ - 2022-01-22T16:03:35.689Z + 2022-01-23T06:26:10.057Z https://liquidjs.com/api/modules/parser_match_operator_ - 2022-01-22T16:03:35.685Z + 2022-01-23T06:26:10.053Z https://liquidjs.com/api/modules/tokens_hash_token_ - 2022-01-22T16:03:35.681Z - - - - - https://liquidjs.com/api/modules/drop_comparable_ - - 2022-01-22T16:03:35.677Z + 2022-01-23T06:26:10.049Z https://liquidjs.com/api/modules/tokens_token_ - 2022-01-22T16:03:35.677Z + 2022-01-23T06:26:10.045Z - https://liquidjs.com/api/modules/template_filter_filter_ + https://liquidjs.com/api/modules/drop_comparable_ - 2022-01-22T16:03:35.669Z + 2022-01-23T06:26:10.041Z https://liquidjs.com/api/modules/template_value_ - 2022-01-22T16:03:35.669Z + 2022-01-23T06:26:10.037Z + + + + + https://liquidjs.com/api/modules/template_filter_filter_ + + 2022-01-23T06:26:10.033Z https://liquidjs.com/api/modules/render_render_ - 2022-01-22T16:03:35.661Z - - - - - https://liquidjs.com/zh-cn/ - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/playground - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/compact - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/concat - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/date - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/default - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/divided_by - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/downcase - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/escape - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/escape_once - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/first - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/floor - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/join - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/json - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/last - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/lstrip - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/map - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/minus - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/modulo - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/newline_to_br - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/overview - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/plus - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/prepend - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/remove - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/remove_first - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/replace - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/replace_first - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/reverse - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/round - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/rstrip - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/size - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/slice - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/sort - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/sort_natural - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/split - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/strip - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/strip_html - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/strip_newlines - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/times - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/truncate - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/truncatewords - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/uniq - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/upcase - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/url_decode - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/url_encode - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/filters/where - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/assign - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/capture - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/case - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/comment - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/cycle - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/decrement - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/for - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/if - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/include - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/increment - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/layout - - 2022-01-22T16:03:03.368Z - - - - - https://liquidjs.com/zh-cn/tags/overview - - 2022-01-22T16:03:03.368Z + 2022-01-23T06:26:10.025Z https://liquidjs.com/zh-cn/tags/raw - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tags/render - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tags/tablerow - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tags/unless - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/access-scope-in-filters - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/caching - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/contribution-guidelines - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/differences - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/intro-to-liquid - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/migrate-to-9 - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/operators - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/options - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/parse-parameters - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/partials-and-layouts - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/plugins - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/register-filters-tags - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/render-file - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z + + + + + https://liquidjs.com/zh-cn/tutorials/render-tag-content + + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/setup - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/sync-and-async - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/truthy-and-falsy - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/use-in-expressjs - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/zh-cn/tutorials/whitespace-control - 2022-01-22T16:03:03.368Z + 2022-01-23T06:25:32.650Z https://liquidjs.com/ - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/manifest.json - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/playground - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/map - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/minus - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/modulo - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/newline_to_br - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/overview - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/plus - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/prepend - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/remove - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/remove_first - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/replace - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/replace_first - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/reverse - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/round - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/rstrip - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/size - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/slice - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/sort - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/sort_natural - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/split - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/strip - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/strip_html - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/strip_newlines - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/times - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/truncate - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/truncatewords - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/uniq - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/upcase - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/url_decode - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/url_encode - - 2022-01-22T16:03:03.364Z - - - - - https://liquidjs.com/filters/where - - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/assign - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/capture - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/case - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/comment - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/cycle - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/decrement - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/echo - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/for - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/if - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/include - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/increment - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/layout - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/liquid - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/overview - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/raw - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/render - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/tablerow - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tags/unless - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/access-scope-in-filters - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/caching - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/contribution-guidelines - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/differences - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/intro-to-liquid - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/migrate-to-9 - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/operators - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/options - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/parse-parameters - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/partials-and-layouts - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/plugins - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/register-filters-tags - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/render-file - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/tutorials/render-tag-content + + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/setup - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/sync-and-async - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/truthy-and-falsy - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/use-in-expressjs - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/tutorials/whitespace-control - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/ + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/playground + + 2022-01-23T06:25:32.646Z https://liquidjs.com/zh-cn/filters/abs - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/zh-cn/filters/append - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/zh-cn/filters/at_least - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/zh-cn/filters/at_most - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/zh-cn/filters/capitalize - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z https://liquidjs.com/zh-cn/filters/ceil - 2022-01-22T16:03:03.364Z + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/compact + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/concat + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/date + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/default + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/divided_by + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/downcase + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/escape + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/escape_once + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/first + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/floor + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/join + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/json + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/last + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/lstrip + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/map + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/minus + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/modulo + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/newline_to_br + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/overview + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/plus + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/prepend + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/remove + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/remove_first + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/replace + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/replace_first + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/reverse + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/round + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/rstrip + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/size + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/slice + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/sort + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/sort_natural + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/split + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/strip + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/strip_html + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/strip_newlines + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/times + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/truncate + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/truncatewords + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/uniq + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/upcase + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/url_decode + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/url_encode + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/filters/where + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/assign + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/capture + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/case + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/comment + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/cycle + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/decrement + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/for + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/if + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/include + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/increment + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/layout + + 2022-01-23T06:25:32.646Z + + + + + https://liquidjs.com/zh-cn/tags/overview + + 2022-01-23T06:25:32.646Z https://liquidjs.com/filters/abs - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/append - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/at_least - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/at_most - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/capitalize - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/ceil - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/compact - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/concat - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/date - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/default - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/divided_by - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/downcase - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/escape - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/escape_once - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/first - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/floor - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/join - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/json - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/last - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z https://liquidjs.com/filters/lstrip - 2022-01-22T16:03:03.360Z + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/map + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/minus + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/modulo + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/newline_to_br + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/overview + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/plus + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/prepend + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/remove + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/remove_first + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/replace + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/replace_first + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/reverse + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/round + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/rstrip + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/size + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/slice + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/sort + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/sort_natural + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/split + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/strip + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/strip_html + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/strip_newlines + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/times + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/truncate + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/truncatewords + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/uniq + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/upcase + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/url_decode + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/url_encode + + 2022-01-23T06:25:32.642Z + + + + + https://liquidjs.com/filters/where + + 2022-01-23T06:25:32.642Z diff --git a/tags/assign.html b/tags/assign.html index 02d2f4ba8..3478aa445 100644 --- a/tags/assign.html +++ b/tags/assign.html @@ -95,21 +95,25 @@

Creates a new variable.

Input

-
{% assign my_variable = false %}
{% if my_variable != true %}
This statement is valid.
{% endif %}
+
{% assign my_variable = false %}
+{% if my_variable != true %}
+  This statement is valid.
+{% endif %}

Output

-
This statement is valid.
+
This statement is valid.

Wrap a variable value in quotations " to save it as a string.

Input

-
{% assign foo = "bar" %}
{{ foo }}
+
{% assign foo = "bar" %}
+{{ foo }}

Output

-
bar
+
bar
- +
diff --git a/tags/capture.html b/tags/capture.html index fb23903a3..1ffd7284e 100644 --- a/tags/capture.html +++ b/tags/capture.html @@ -95,21 +95,29 @@

Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through capture are strings.

Input

-
{% capture my_variable %}I am being captured.{% endcapture %}
{{ my_variable }}
+
{% capture my_variable %}I am being captured.{% endcapture %}
+{{ my_variable }}

Output

-
I am being captured.
+
I am being captured.

Using capture, you can create complex strings using other variables created with assign:

Input

-
{% assign favorite_food = "pizza" %}
{% assign age = 35 %}

{% capture about_me %}
I am {{ age }} and my favorite food is {{ favorite_food }}.
{% endcapture %}

{{ about_me }}
+
{% assign favorite_food = "pizza" %}
+{% assign age = 35 %}
+
+{% capture about_me %}
+I am {{ age }} and my favorite food is {{ favorite_food }}.
+{% endcapture %}
+
+{{ about_me }}

Output

-
I am 35 and my favourite food is pizza.
+
I am 35 and my favourite food is pizza.
- +
diff --git a/tags/case.html b/tags/case.html index 2f9f3c383..7c770f138 100644 --- a/tags/case.html +++ b/tags/case.html @@ -95,14 +95,22 @@

Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

Input

-
{% assign handle = "cake" %}
{% case handle %}
{% when "cake" %}
This is a cake
{% when "cookie", "biscuit" %}
This is a cookie
{% else %}
This is not a cake nor a cookie
{% endcase %}
+
{% assign handle = "cake" %}
+{% case handle %}
+  {% when "cake" %}
+     This is a cake
+  {% when "cookie", "biscuit" %}
+     This is a cookie
+  {% else %}
+     This is not a cake nor a cookie
+{% endcase %}

Output

-
This is a cake
+
This is a cake
- +
diff --git a/tags/comment.html b/tags/comment.html index 4d1e95dbe..812c9eeb7 100644 --- a/tags/comment.html +++ b/tags/comment.html @@ -95,14 +95,16 @@

Allows you to leave un-rendered code inside a Liquid template. Any text within the opening and closing comment blocks will not be printed, and any Liquid code within will not be executed.

Input

-
Anything you put between {% comment %} and {% endcomment %} tags
is turned into a comment.
+
Anything you put between {% comment %} and {% endcomment %} tags
+is turned into a comment.

Output

-
Anything you put between  tags
is turned into a comment.
+
Anything you put between  tags
+is turned into a comment.
- +
diff --git a/tags/cycle.html b/tags/cycle.html index 905d75d19..e997cd9d9 100644 --- a/tags/cycle.html +++ b/tags/cycle.html @@ -95,10 +95,16 @@

Loops through a group of strings and prints them in the order that they were passed as arguments. Each time cycle is called, the next string argument is printed.

Basic Usage

Input

-
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
{% cycle "one", "two", "three" %}
+
{% cycle "one", "two", "three" %}
+{% cycle "one", "two", "three" %}
+{% cycle "one", "two", "three" %}
+{% cycle "one", "two", "three" %}

Output

-
one
two
three
one
+
one
+two
+three
+one

Uses for cycle include:

Parameters

cycle accepts a “cycle group” parameter in cases where you need multiple cycle blocks in one template. If no name is supplied for the cycle group, then it is assumed that multiple calls with the same parameters are one group.

Input

-
{% cycle "first": "one", "two", "three" %}
{% cycle "second": "one", "two", "three" %}
{% cycle "second": "one", "two", "three" %}
{% cycle "first": "one", "two", "three" %}
+
{% cycle "first": "one", "two", "three" %}
+{% cycle "second": "one", "two", "three" %}
+{% cycle "second": "one", "two", "three" %}
+{% cycle "first": "one", "two", "three" %}

Output

-
one
one
two
two
+
one
+one
+two
+two
- +
diff --git a/tags/decrement.html b/tags/decrement.html index ab0325e17..f1623ca5c 100644 --- a/tags/decrement.html +++ b/tags/decrement.html @@ -95,16 +95,20 @@

Creates a new number variable, and decreases its value by one every time it is called. The first value is -1.

Input

-
{% decrement variable %}
{% decrement variable %}
{% decrement variable %}
+
{% decrement variable %}
+{% decrement variable %}
+{% decrement variable %}

Output

-
-1
-2
-3
+
-1
+-2
+-3

Like increment, variables declared inside decrement are independent from variables created through assign or capture.

- +
diff --git a/tags/echo.html b/tags/echo.html index f4f3d32ad..676f9a493 100644 --- a/tags/echo.html +++ b/tags/echo.html @@ -95,14 +95,15 @@

Outputs an expression in the rendered HTML. This is identical to wrapping an expression in {{` and `}}, but works inside liquid tags and supports filters.

echo

Input

-
{% assign username = 'Bob' %}
{% echo username | append: ", welcome to LiquidJS!" | capitalize %}
+
{% assign username = 'Bob' %}
+{% echo username | append: ", welcome to LiquidJS!" | capitalize %}

Output

-
Bob, welcome to LiquidJS!
+
Bob, welcome to LiquidJS!
- +
diff --git a/tags/for.html b/tags/for.html index f5eaab3aa..bee8f549d 100644 --- a/tags/for.html +++ b/tags/for.html @@ -96,115 +96,188 @@

Iteration tags run blocks of code repeatedly.

Basic Usage

for…in

Repeatedly executes a block of code. For a full list of attributes available within a for loop, see forloop.

Input

-
{% for product in collection.products %}
{{ product.title }}
{% endfor %}
+
{% for product in collection.products %}
+  {{ product.title }}
+{% endfor %}

Output

-
hat shirt pants
+
hat shirt pants

For loops can iterate over arrays, hashes, and ranges of integers.

When iterating a hash, item[0] contains the key, and item[1] contains the value:

Input

-
{% for item in hash %}
* {{ item[0] }}: {{ item[1] }}
{% endfor %}
+
{% for item in hash %}
+  * {{ item[0] }}: {{ item[1] }}
+{% endfor %}

Output

-
* key1: value1
* key2: value2
+
* key1: value1
+* key2: value2

else

Specifies a fallback case for a for loop which will run if the loop has zero length.

Input

-
{% for product in collection.products %}
{{ product.title }}
{% else %}
The collection is empty.
{% endfor %}
+
{% for product in collection.products %}
+  {{ product.title }}
+{% else %}
+  The collection is empty.
+{% endfor %}

Output

-
The collection is empty.
+
The collection is empty.

break

Causes the loop to stop iterating when it encounters the break tag.

Input

-
{% for i in (1..5) %}
{%- if i == 4 -%}
{% break %}
{%- else -%}
{{ i }}
{%- endif -%}
{% endfor %}
+
{% for i in (1..5) %}
+  {%- if i == 4 -%}
+    {% break %}
+  {%- else -%}
+    {{ i }}
+  {%- endif -%}
+{% endfor %}

Output

-
123
+
123

continue

Causes the loop to skip the current iteration when it encounters the continue tag.

Input

-
{% for i in (1..5) %}
{%- if i == 4 -%}
{%- continue -%}
{%- else -%}
{{ i }}
{%- endif -%}
{% endfor %}
+
{% for i in (1..5) %}
+  {%- if i == 4 -%}
+    {%- continue -%}
+  {%- else -%}
+    {{ i }}
+  {%- endif -%}
+{% endfor %}

Output

-
1235
+
1235

forloop

There’s a forloop object available inside for loops. It’s used to indicate the current state of for loop.

The forloop.first, forloop.last and forloop.length property:

Input

-
{% for i in (1..5) %}
{%- if forloop.first == true -%} First
{%- elsif forloop.last == true -%} Last
{%- else -%} {{ forloop.length }}
{%- endif %}
{% endfor -%}
+
{% for i in (1..5) %}
+  {%- if forloop.first == true -%} First
+  {%- elsif forloop.last == true -%} Last
+  {%- else -%} {{ forloop.length }}
+  {%- endif %}
+{% endfor -%}

Output

-
First
5
5
5
Last
+
First
+5
+5
+5
+Last

The forloop.index, forloop.index0, forloop.rindex and forloop.rindex0 property:

Input

-
index index0 rindex rindex0
{% for i in (1..5) %}
{{- forloop.index }} {{ forloop.index0 }} {{ forloop.rindex }} {{ forloop.rindex0 }}
{% endfor -%}
+
index index0 rindex rindex0
+{% for i in (1..5) %}
+  {{- forloop.index }}     {{ forloop.index0 }}      {{ forloop.rindex }}      {{ forloop.rindex0 }}
+{% endfor -%}

Output

-
index index0 rindex rindex0
1 0 5 4
2 1 4 3
3 2 3 2
4 3 2 1
5 4 1 0
+
index index0 rindex rindex0
+1     0      5      4
+2     1      4      3
+3     2      3      2
+4     3      2      1
+5     4      1      0

Parameters

limit

Limits the loop to the specified number of iterations.

Input

-
<!-- for array = [1,2,3,4,5,6] -->
{% for item in array limit:2 %}
{{- item -}}
{% endfor %}
+
<!-- for array = [1,2,3,4,5,6] -->
+{% for item in array limit:2 %}
+  {{- item -}}
+{% endfor %}

Output

-
12
+
12

offset

Begins the loop at the specified index.

Input

-
<!-- for array = [1,2,3,4,5,6] -->
{% for item in array offset:2 %}
{{- item -}}
{% endfor %}
+
<!-- for array = [1,2,3,4,5,6] -->
+{% for item in array offset:2 %}
+  {{- item -}}
+{% endfor %}

Output

-
3456
+
3456

offset:continue

v9.33.0

Offset value can be continue to continue previous loop. For example:

Input

-
<!-- for array = [1,2,3,4,5,6] -->
{% for item in array limit:2 %}
{{- item -}}
{% endfor%}
{% for item in array offset:continue %}
{{- item -}}
{% endfor%}
+
<!-- for array = [1,2,3,4,5,6] -->
+{% for item in array limit:2 %}
+  {{- item -}}
+{% endfor%}
+{% for item in array offset:continue %}
+  {{- item -}}
+{% endfor%}

Output

-
12
3456
+
12
+3456

For the same variable name ("item" in this case) and same collection ("array" in this case), there’s one position record. That means you can start a new loop with a different variable name:

Input

-
<!-- for array = [1,2,3,4,5,6] -->
{% for item in array limit:2 %}
{{- item -}}
{% endfor%}
{% for item2 in array offset:continue %}
{{- item2 -}}
{% endfor%}
+
<!-- for array = [1,2,3,4,5,6] -->
+{% for item in array limit:2 %}
+  {{- item -}}
+{% endfor%}
+{% for item2 in array offset:continue %}
+  {{- item2 -}}
+{% endfor%}

Output

-
12
123456
+
12
+123456

range

Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.

Input

-
{% for i in (3..5) %}
{{- i -}}
{% endfor-%}

{% assign num = 4 %}
{% for i in (1..num) %}
{{- i -}}
{% endfor %}
+
{% for i in (3..5) %}
+  {{- i -}}
+{% endfor-%}
+
+{% assign num = 4 %}
+{% for i in (1..num) %}
+  {{- i -}}
+{% endfor %}

Output

-
345
1234
+
345
+1234

reversed

Reverses the order of the loop. Note that this flag’s spelling is different from the filter reverse.

Input

-
<!-- if array = [1,2,3,4,5,6] -->
{% for item in array reversed %}
{{ item }}
{% endfor %}
+
<!-- if array = [1,2,3,4,5,6] -->
+{% for item in array reversed %}
+  {{ item }}
+{% endfor %}

Output

-
6 5 4 3 2 1
+
6 5 4 3 2 1

When used with additional parameters, order is important. Leading with reversed reverses the order of the loop before executing the other parameters.

Input

-
{% for i in (1..8) reversed limit: 4 %}
{{ i }}
{% endfor %}
+
{% for i in (1..8) reversed limit: 4 %}
+  {{ i }}
+{% endfor %}

Output

-
8 7 6 5
+
8 7 6 5

Input

-
{% for i in (1..8) limit: 4 reversed %}
{{ i }}
{% endfor %}
+
{% for i in (1..8) limit: 4 reversed %}
+  {{ i }}
+{% endfor %}

Output

-
4 3 2 1
+
4 3 2 1
- +
diff --git a/tags/if.html b/tags/if.html index c6fa9acef..416bfb6a3 100644 --- a/tags/if.html +++ b/tags/if.html @@ -95,21 +95,30 @@

Executes a block of code only if a certain condition is true.

if

Input

-
{% if product.title == "Awesome Shoes" %}
These shoes are awesome!
{% endif %}
+
{% if product.title == "Awesome Shoes" %}
+  These shoes are awesome!
+{% endif %}

Output

-
These shoes are awesome!
+
These shoes are awesome!

elsif / else

Adds more conditions within an if or unless block.

Input

-
<!-- If customer.name = "anonymous" -->
{% if customer.name == "kevin" %}
Hey Kevin!
{% elsif customer.name == "anonymous" %}
Hey Anonymous!
{% else %}
Hi Stranger!
{% endif %}
+
<!-- If customer.name = "anonymous" -->
+{% if customer.name == "kevin" %}
+  Hey Kevin!
+{% elsif customer.name == "anonymous" %}
+  Hey Anonymous!
+{% else %}
+  Hi Stranger!
+{% endif %}

Output

-
Hey Anonymous!
+
Hey Anonymous!
- +
diff --git a/tags/include.html b/tags/include.html index cbc12ac6a..ab1103b86 100644 --- a/tags/include.html +++ b/tags/include.html @@ -97,30 +97,32 @@

Include a Template

Renders a partial template from the template roots.

-
{% include 'footer.liquid' %}
+
{% include 'footer.liquid' %}

If extname option is set, the above .liquid extension becomes optional:

-
{% include 'footer' %}
+
{% include 'footer' %}

When a partial template is rendered by include, the code inside it can access its parent’s variables but its parent cannot access variables defined inside a included template.

Passing Variables

Variables defined in parent’s scope can be passed to a the partial template by listing them as parameters on the include tag:

-
{% assign my_variable = 'apples' %}
{% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
+
{% assign my_variable = 'apples' %}
+{% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

The with Parameter

A single object can be passed to a snippet by using the with...as syntax:

-
{% assign featured_product = all_products['product_handle'] %}
{% include 'product' with featured_product as product %}
+
{% assign featured_product = all_products['product_handle'] %}
+{% include 'product' with featured_product as product %}

In the example above, the product variable in the partial template will hold the value of featured_product in the parent template.

Outputs & Filters

When filename is specified as literal string, it supports Liquid output and filter syntax. Useful when concatenating strings for a complex filename.

-
{% include "prefix/{{name | append: \".html\"}}" %}
+
{% include "prefix/{{name | append: \".html\"}}" %}
Escaping

In LiquidJS, " within quoted string literals need to be escaped by adding a slash before the quote, e.g. \". Using Jekyll-like filenames can make this easier, see below.

Jekyll-like filenames

Setting dynamicPartials to false will enable Jekyll-like filenames, where file names are specified as literal string without surrounding quotes. Liquid outputs and filters are also supported within that, for example:

-
{% include prefix/{{ page.my_variable }}/suffix %}
+
{% include prefix/{{ page.my_variable }}/suffix %}

This way, you don’t need to escape " in the filename expression.

-
{% include prefix/{{name | append: ".html"}} %}
+
{% include prefix/{{name | append: ".html"}} %}

Jekyll include

v9.33.0

@@ -131,18 +133,24 @@
  • Parameters are under include variable instead of current scope.
  • For example, the following template:

    -
    {% include article.html header="HEADER" content="CONTENT" %}
    +
    {% include article.html header="HEADER" content="CONTENT" %}

    article.html with following content:

    -
    <article>
    <header>{{include.header}}</header>
    {{include.content}}
    </article>
    +
    <article>
    +  <header>{{include.header}}</header>
    +  {{include.content}}
    +</article>

    Note that we’re referencing the first parameter by include.header instead of header. Will output following:

    -
    <article>
    <header>HEADER</header>
    CONTENT
    </article>
    +
    <article>
    +  <header>HEADER</header>
    +  CONTENT
    +</article>
    - +
    diff --git a/tags/increment.html b/tags/increment.html index 53dc85f2e..47ed70053 100644 --- a/tags/increment.html +++ b/tags/increment.html @@ -95,23 +95,34 @@

    Creates a new number variable, and increases its value by one every time it is called. The first value is 0.

    Input

    -
    {% increment my_counter %}
    {% increment my_counter %}
    {% increment my_counter %}
    +
    {% increment my_counter %}
    +{% increment my_counter %}
    +{% increment my_counter %}

    Output

    -
    0
    1
    2
    +
    0
    +1
    +2

    Variables created through the increment tag are independent from variables created through assign or capture.

    In the example below, a variable named “var” is created through assign. The increment tag is then used several times on a variable with the same name. Note that the increment tag does not affect the value of “var” that was created through assign.

    Input

    -
    {% assign var = 10 %}
    {% increment var %}
    {% increment var %}
    {% increment var %}
    {{ var }}
    +
    {% assign var = 10 %}
    +{% increment var %}
    +{% increment var %}
    +{% increment var %}
    +{{ var }}

    Output

    -
    0
    1
    2
    10
    +
    0
    +1
    +2
    +10
    - +
    diff --git a/tags/layout.html b/tags/layout.html index c2989abb5..2723b46c9 100644 --- a/tags/layout.html +++ b/tags/layout.html @@ -94,39 +94,68 @@

    v1.9.1

    Using a Layout

    Introduce a layout template for the current template to render in. The directory for layout files are defined by layouts or root.

    -
    // default-layout.liquid
    Header
    {% block %}{% endblock %}
    Footer

    // page.liquid
    {% layout "default-layout.liquid" %}
    {% block %}My page content{% endblock %}

    // result
    Header
    My page content
    Footer
    +
    // default-layout.liquid
    +Header
    +{% block %}{% endblock %}
    +Footer
    +
    +// page.liquid
    +{% layout "default-layout.liquid" %}
    +{% block %}My page content{% endblock %}
    +
    +// result
    +Header
    +My page content
    +Footer

    If extname option is set, the .liquid extension becomes optional:

    -
    {% layout 'default-layout' %}
    +
    {% layout 'default-layout' %}
    Scoping

    When a partial template is rendered by layout, its template have access for its caller’s variables but not vice versa. Variables defined in layout will be popped out before control returning to its caller.

    Multiple Blocks

    The layout file can contain multiple blocks, each with a specified name. The following snippets yield same result as in the above example.

    -
    // default-layout.liquid
    {% block header %}{% endblock %}
    {% block content %}{% endblock %}
    {% block footer %}{% endblock %}

    // page.liquid
    {% layout "default-layout.liquid" %}
    {% block header %}Header{% endblock %}
    {% block content %}My page content{% endblock %}
    {% block footer %}Footer{% endblock %}
    +
    // default-layout.liquid
    +{% block header %}{% endblock %}
    +{% block content %}{% endblock %}
    +{% block footer %}{% endblock %}
    +
    +// page.liquid
    +{% layout "default-layout.liquid" %}
    +{% block header %}Header{% endblock %}
    +{% block content %}My page content{% endblock %}
    +{% block footer %}Footer{% endblock %}

    Default Block Contents

    In the above layout files, blocks has empty contents. But it’s not necessarily be empty, in which case, the block contents in layout files will be used as default templates. The following snippets are also equivalent to the above examples:

    -
    // default-layout.liquid
    {% block header %}Header{% endblock %}
    {% block content %}{% endblock %}
    {% block footer %}Footer{% endblock %}

    // page.liquid
    {% layout "default-layout.liquid" %}
    {% block content %}My page content{% endblock %}
    +
    // default-layout.liquid
    +{% block header %}Header{% endblock %}
    +{% block content %}{% endblock %}
    +{% block footer %}Footer{% endblock %}
    +
    +// page.liquid
    +{% layout "default-layout.liquid" %}
    +{% block content %}My page content{% endblock %}

    Passing Variables

    Variables defined in current template can be passed to a the layout template by listing them as parameters on the layout tag:

    -
    {% assign my_variable = 'apples' %}
    {% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    +{% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    Outputs & Filters

    When filename is specified as literal string, it supports Liquid output and filter syntax. Useful when concatenating strings for a complex filename.

    -
    {% layout "prefix/{{name | append: \".html\"}}" %}
    +
    {% layout "prefix/{{name | append: \".html\"}}" %}
    Escaping

    In LiquidJS, " within quoted string literals need to be escaped. Adding a slash before the quote, e.g. \". Using Jekyll-like filenames can make this easier, see below.

    Jekyll-like Filenames

    Setting dynamicPartials to false will enable Jekyll-like filenames, file names are specified as literal string. And it also supports Liquid outputs and filters.

    -
    {% layout prefix/{{ page.my_variable }}/suffix %}
    +
    {% layout prefix/{{ page.my_variable }}/suffix %}

    This way, you don’t need to escape " in the filename expression.

    -
    {% layout prefix/{{name | append: ".html"}} %}
    +
    {% layout prefix/{{name | append: ".html"}} %}
    - +
    diff --git a/tags/liquid.html b/tags/liquid.html index 02dc6e952..587baae5f 100644 --- a/tags/liquid.html +++ b/tags/liquid.html @@ -95,14 +95,23 @@

    Encloses multiple tags within one set of delimiters, to allow writing Liquid logic more concisely.

    liquid

    Input

    -
    {% liquid
    assign names = 'Bob, Sally' | split: ', '

    for name in names
    echo 'Hello, ' | append: name
    unless forloop.last
    echo ', '
    endunless
    endfor
    %}
    +
    {% liquid
    +  assign names = 'Bob, Sally' | split: ', '
    +
    +  for name in names
    +    echo 'Hello, ' | append: name
    +    unless forloop.last
    +      echo ', '
    +    endunless
    +  endfor
    +%}

    Output

    -
    Hello, Bob, Hello Sally
    +
    Hello, Bob, Hello Sally
    - +
    diff --git a/tags/overview.html b/tags/overview.html index 65e750c5c..335229eaa 100644 --- a/tags/overview.html +++ b/tags/overview.html @@ -130,7 +130,7 @@
    - +
    diff --git a/tags/raw.html b/tags/raw.html index 36fb9d0c3..4ef8325f7 100644 --- a/tags/raw.html +++ b/tags/raw.html @@ -95,14 +95,17 @@

    Raw temporarily disables tag processing. This is useful for generating content
    (eg, Mustache, Handlebars) which uses conflicting syntax.

    Input

    -
    {% raw %}
    In Handlebars, {{ this }} will be HTML-escaped, but
    {{{ that }}} will not.
    {% endraw %}
    +
    {% raw %}
    +  In Handlebars, {{ this }} will be HTML-escaped, but
    +  {{{ that }}} will not.
    +{% endraw %}

    Output

    -
    In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
    +
    In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
    - +
    diff --git a/tags/render.html b/tags/render.html index 502a86756..a30ff8e7a 100644 --- a/tags/render.html +++ b/tags/render.html @@ -94,36 +94,48 @@

    v9.2.0

    Render a Template

    Render a partial template from partials directory specified by partials or root.

    -
    // index.liquid
    Contents
    {% render 'footer.liquid' %}

    // footer.liquid
    Footer

    // result
    Contents
    Footer
    +
    // index.liquid
    +Contents
    +{% render 'footer.liquid' %}
    +
    +// footer.liquid
    +Footer
    +
    +// result
    +Contents
    +Footer

    If extname option is set, the above .liquid extension becomes optional:

    -
    {% render 'footer' %}
    +
    {% render 'footer' %}
    Variable Scope

    When a partial template is rendered, the code inside it can’t access its parent’s variables and its variables won’t be accessible by its parent. This encapsulation makes partials easier to understand and maintain.

    Passing Variables

    Variables defined in parent’s scope can be passed to a the partial template by listing them as parameters on the render tag:

    -
    {% assign my_variable = 'apples' %}
    {% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    +{% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    globals don’t need to be passed down. They are accessible from all files.

    Outputs & Filters

    When filename is specified as literal string, it supports Liquid output and filter syntax. Useful when concatenating strings for a complex filename.

    -
    {% render "prefix/{{name | append: \".html\"}}" %}
    +
    {% render "prefix/{{name | append: \".html\"}}" %}
    Escaping

    In LiquidJS, " within quoted string literals need to be escaped. Adding a slash before the quote, e.g. \". Using Jekyll-like filenames can make this easier, see below.

    Jekyll-like Filenames

    Setting dynamicPartials to false will enable Jekyll-like filenames, file names are specified as literal string. And it also supports Liquid outputs and filters.

    -
    {% render prefix/{{ page.my_variable }}/suffix %}
    +
    {% render prefix/{{ page.my_variable }}/suffix %}

    This way, you don’t need to escape " in the filename expression.

    -
    {% render prefix/{{name | append: ".html"}} %}
    +
    {% render prefix/{{name | append: ".html"}} %}

    Parameters

    The with Parameter

    A single object can be passed to a snippet by using the with...as syntax:

    -
    {% assign featured_product = all_products['product_handle'] %}
    {% render 'product' with featured_product as product %}
    +
    {% assign featured_product = all_products['product_handle'] %}
    +{% render 'product' with featured_product as product %}

    In the example above, the product variable in the partial template will hold the value of featured_product in the parent template.

    The for Parameter

    A partial template can be rendered once for each value of an enumerable by using the for...as syntax:

    -
    {% assign variants = product.variants %}
    {% render 'variant' for variants as variant %}
    +
    {% assign variants = product.variants %}
    +{% render 'variant' for variants as variant %}

    In the example above, the partial template will be rendered once for each variant of the product, and the variant variable will hold a product’s variant object within the snippet.

    The forloop object

    When using the for parameter, the forloop object is accessible within the snippet.

    @@ -132,7 +144,7 @@
    - +
    diff --git a/tags/tablerow.html b/tags/tablerow.html index 85e69891d..90efdd09f 100644 --- a/tags/tablerow.html +++ b/tags/tablerow.html @@ -95,30 +95,101 @@

    Generates an HTML table. Must be wrapped in opening <table> and closing </table> HTML tags.

    Basic Usage

    Input

    -
    <table>
    {% tablerow product in collection.products %}
    {{ product.title }}
    {% endtablerow %}
    </table>
    +
    <table>
    +{% tablerow product in collection.products %}
    +  {{ product.title }}
    +{% endtablerow %}
    +</table>

    Output

    -
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    <td class="col3">
    Batman Poster
    </td>
    <td class="col4">
    Bullseye Shirt
    </td>
    <td class="col5">
    Another Classic Vinyl
    </td>
    <td class="col6">
    Awesome Jeans
    </td>
    </tr>
    </table>
    +
    <table>
    +  <tr class="row1">
    +    <td class="col1">
    +      Cool Shirt
    +    </td>
    +    <td class="col2">
    +      Alien Poster
    +    </td>
    +    <td class="col3">
    +      Batman Poster
    +    </td>
    +    <td class="col4">
    +      Bullseye Shirt
    +    </td>
    +    <td class="col5">
    +      Another Classic Vinyl
    +    </td>
    +    <td class="col6">
    +      Awesome Jeans
    +    </td>
    +  </tr>
    +</table>

    Parameters

    cols

    Defines how many columns the tables should have.

    Input

    -
    {% tablerow product in collection.products cols:2 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 %}
    +  {{ product.title }}
    +{% endtablerow %}

    Output

    -
    <table>
    <tr class="row1">
    <td class="col1">
    Cool Shirt
    </td>
    <td class="col2">
    Alien Poster
    </td>
    </tr>
    <tr class="row2">
    <td class="col1">
    Batman Poster
    </td>
    <td class="col2">
    Bullseye Shirt
    </td>
    </tr>
    <tr class="row3">
    <td class="col1">
    Another Classic Vinyl
    </td>
    <td class="col2">
    Awesome Jeans
    </td>
    </tr>
    </table>
    +
    <table>
    +  <tr class="row1">
    +    <td class="col1">
    +      Cool Shirt
    +    </td>
    +    <td class="col2">
    +      Alien Poster
    +    </td>
    +  </tr>
    +  <tr class="row2">
    +    <td class="col1">
    +      Batman Poster
    +    </td>
    +    <td class="col2">
    +      Bullseye Shirt
    +    </td>
    +  </tr>
    +  <tr class="row3">
    +    <td class="col1">
    +      Another Classic Vinyl
    +    </td>
    +    <td class="col2">
    +      Awesome Jeans
    +    </td>
    +  </tr>
    +</table>

    limit

    Exits the tablerow after a specific index.

    -
    {% tablerow product in collection.products cols:2 limit:3 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 limit:3 %}
    +  {{ product.title }}
    +{% endtablerow %}

    offset

    Starts the tablerow after a specific index.

    -
    {% tablerow product in collection.products cols:2 offset:3 %}
    {{ product.title }}
    {% endtablerow %}
    +
    {% tablerow product in collection.products cols:2 offset:3 %}
    +  {{ product.title }}
    +{% endtablerow %}

    range

    Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers.

    -
    <!--variable number example-->

    {% assign num = 4 %}
    <table>
    {% tablerow i in (1..num) %}
    {{ i }}
    {% endtablerow %}
    </table>

    <!--literal number example-->

    <table>
    {% tablerow i in (3..5) %}
    {{ i }}
    {% endtablerow %}
    </table>
    +
    <!--variable number example-->
    +
    +{% assign num = 4 %}
    +<table>
    +{% tablerow i in (1..num) %}
    +  {{ i }}
    +{% endtablerow %}
    +</table>
    +
    +<!--literal number example-->
    +
    +<table>
    +{% tablerow i in (3..5) %}
    +  {{ i }}
    +{% endtablerow %}
    +</table>
    - +
    diff --git a/tags/unless.html b/tags/unless.html index f0131f15a..6c8c6cb14 100644 --- a/tags/unless.html +++ b/tags/unless.html @@ -95,17 +95,21 @@

    The opposite of if – executes a block of code only if a certain condition is not met.

    Input

    -
    {% unless product.title == "Awesome Shoes" %}
    These shoes are not awesome.
    {% endunless %}
    +
    {% unless product.title == "Awesome Shoes" %}
    +  These shoes are not awesome.
    +{% endunless %}

    Output

    -
    These shoes are not awesome.
    +
    These shoes are not awesome.

    This would be the equivalent of doing the following:

    -
    {% if product.title != "Awesome Shoes" %}
    These shoes are not awesome.
    {% endif %}
    +
    {% if product.title != "Awesome Shoes" %}
    +  These shoes are not awesome.
    +{% endif %}
    - +
    diff --git a/tutorials/access-scope-in-filters.html b/tutorials/access-scope-in-filters.html index dba70e292..2fb533f6e 100644 --- a/tutorials/access-scope-in-filters.html +++ b/tutorials/access-scope-in-filters.html @@ -77,7 +77,7 @@
    @@ -92,10 +92,19 @@

    As covered in Register Filters/Tags, we can access filter arguments directly in filter function like:

    -
    // Usage: {{ 1 | add: 2, 3 }}
    // Output: 6
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    +
    // Usage: {{ 1 | add: 2, 3 }}
    +// Output: 6
    +engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)

    When it comes to stateful filters, for example transform a URL path to full URL, we’ll need to access a origin in current scope:

    -
    // Usage: {{ '/index.html' | fullURL }}
    // Scope: { origin: "https://liquidjs.com" }
    // Output: https://liquidjs.com/index.html

    engine.registerFilter('fullURL', function (path) {
    const origin = this.context.get(['origin'])
    return new URL(path, origin).toString()
    })
    +
    // Usage: {{ '/index.html' | fullURL }}
    +// Scope: { origin: "https://liquidjs.com" }
    +// Output: https://liquidjs.com/index.html
    +
    +engine.registerFilter('fullURL', function (path) {
    +    const origin = this.context.get(['origin'])
    +    return new URL(path, origin).toString() 
    +})

    See this JSFiddle: http://jsfiddle.net/ctj364up/1/

    Arrow Functions

    this in arrow functions is bound to current JavaScript context, you’ll need to use function(){} instead of ()=>{} syntax to access this.context correctly.

    @@ -104,7 +113,7 @@
    - +
    @@ -151,7 +160,7 @@ diff --git a/tutorials/caching.html b/tutorials/caching.html index 91bd562db..471b50672 100644 --- a/tutorials/caching.html +++ b/tutorials/caching.html @@ -77,7 +77,7 @@
    @@ -95,19 +95,34 @@

    LiquidJS provides multiple ways to cache the parsed templates to improve performance.

    Programmaticly

    The .parse(), .parseFile(), .parseFileSync() APIs are used to parse templates from string or files. The result template can be then rendered multiple times with different context.

    Parse from string:

    -
    var tpl = engine.parse('{{name | capitalize}}');

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parse('{{name | capitalize}}');
    +
    +engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    +engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    Parse from file:

    -
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}
    +
    +engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    +engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    The template string/file is parsed only once and renderd multiple times using different context. Templates for different files can be stored into a Map and can be retrieved directly for subsequent renders.

    The cache Option

    The cache option can be set to instruct liquidjs to use cached parsed templates each time you call renderFile or renderFileSync.

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: true
    });

    // liquidjs parses the hello.liquid, then renders it with {name: 'alice'}
    engine.renderFileSync('hello', {name: 'alice'})

    // liquidjs finds the cached template, then renders it with {name: 'bob'}
    engine.renderFileSync('hello', {name: 'bob'})
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid({
    +    cache: true
    +});
    +
    +// liquidjs parses the hello.liquid, then renders it with {name: 'alice'}
    +engine.renderFileSync('hello', {name: 'alice'})
    +
    +// liquidjs finds the cached template, then renders it with {name: 'bob'}
    +engine.renderFileSync('hello', {name: 'bob'})
    - +
    @@ -154,7 +169,7 @@ diff --git a/tutorials/changelog.html b/tutorials/changelog.html index d51fbb2cc..f3e173d92 100644 --- a/tutorials/changelog.html +++ b/tutorials/changelog.html @@ -77,7 +77,7 @@
    - +
    @@ -555,7 +555,7 @@ diff --git a/tutorials/contribution-guidelines.html b/tutorials/contribution-guidelines.html index 42bde94cc..abc2d9902 100644 --- a/tutorials/contribution-guidelines.html +++ b/tutorials/contribution-guidelines.html @@ -77,7 +77,7 @@
    @@ -93,10 +93,10 @@

    Star on Github 👉 harttle/liquidjs

    Starring LiquidJS is the most important and easiest way to support us: boost its rank and expose it to more people, which in turn makes it better.

    Show Me Your Code

    Code Style: LiquidJS applies standard and @typescript-eslint/recommended rules, make sure it’s still valid before commit:

    -
    npm run lint
    +
    npm run lint

    Testing: Make sure test cases pass with your patch merged:

    -
    npm test
    +
    npm test

    Commit Message: Please align to the Angular Commit Message Guidelines, especially note the type identifier, on which semantic-release bot depends.

    Backward-Compatibility: please be backward-compatible. LiquidJS is used by multiple layers of softwares, including underlying libraries, compilers, site generators and Web servers. It’s not easy to do a major upgrade for most of them.

    @@ -106,7 +106,7 @@
    - +
    @@ -153,7 +153,7 @@ diff --git a/tutorials/differences.html b/tutorials/differences.html index 79f82ae98..d3a10b98f 100644 --- a/tutorials/differences.html +++ b/tutorials/differences.html @@ -77,7 +77,7 @@
    - +
    @@ -153,7 +153,7 @@ diff --git a/tutorials/intro-to-liquid.html b/tutorials/intro-to-liquid.html index ace8e7edd..24c62e038 100644 --- a/tutorials/intro-to-liquid.html +++ b/tutorials/intro-to-liquid.html @@ -77,7 +77,7 @@

    Outputs

    Outputs are used to output variables, which can be transformed by filters, into HTML. The following template will insert the value of username into the input’s value:

    -
    <input type="text" name="user" value="{{username}}">
    +
    <input type="text" name="user" value="{{username}}">

    Values in output can be transformed by filters before output. To append a string after the variable:

    -
    {{ username | append: ", welcome to LiquidJS!" }}
    +
    {{ username | append: ", welcome to LiquidJS!" }}

    Filters can be chained:

    -
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}
    +
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}

    A complete list of filters supported by LiquidJS can be found here.

    Tags

    Tags are used to control the template rendering process, manipulating template variables, inter-op with other templates, etc. For example assign can be used to define a variable which can be later used in the template:

    -
    {% assign foo = "FOO" %}
    +
    {% assign foo = "FOO" %}

    Typically tags appear in pairs with a start tag and a corresponding end tag. For example:

    -
    {% if foo == "FOO" %}
    Variable `foo` equals "FOO"
    {% else %}
    Variable `foo` not equals "FOO"
    {% endif %}
    +
    {% if foo == "FOO" %}
    +    Variable `foo` equals "FOO"
    +{% else %}
    +    Variable `foo` not equals "FOO"
    +{% endif %}

    A complete list of tags supported by LiquidJS can be found here.

    - +
    @@ -167,7 +171,7 @@ diff --git a/tutorials/migrate-to-9.html b/tutorials/migrate-to-9.html index 694d6e471..f2ebabdbd 100644 --- a/tutorials/migrate-to-9.html +++ b/tutorials/migrate-to-9.html @@ -77,7 +77,7 @@
    - +
    @@ -162,7 +162,7 @@ diff --git a/tutorials/operators.html b/tutorials/operators.html index 159d935d9..2b164fddf 100644 --- a/tutorials/operators.html +++ b/tutorials/operators.html @@ -77,7 +77,7 @@
    - +
    @@ -152,7 +152,7 @@ diff --git a/tutorials/options.html b/tutorials/options.html index d48b380c7..19a7e2628 100644 --- a/tutorials/options.html +++ b/tutorials/options.html @@ -77,7 +77,7 @@
    @@ -92,7 +92,10 @@

    The Liquid constructor accepts a plain object as options to define the behavior of LiquidJS. All of these options are optional thus we can specify any of them, for example the cache option:

    -
    const { Liquid } = require('liquidjs')
    const engine = new Liquid({
    cache: true
    })
    +
    const { Liquid } = require('liquidjs')
    +const engine = new Liquid({
    +    cache: true
    +})
    API Document

    Following is an overview for all the options, for exact types and signatures please refer to LiquidOptions | API.

    @@ -108,10 +111,10 @@

    Note: for historical reasons, it’s named dynamicPartials but it also works for layouts.

    dynamicPartials indicates whether or not to treat filename arguments in include, render, layout tags as a variable. Defaults to true. For example, render the following snippet with scope { file: 'foo.html' } will include the foo.html:

    -
    {% include file %}
    +
    {% include file %}

    Setting dynamicPartials: false, LiquidJS will try to include the file named file, which is weird but allows simpler syntax if your template relations are static:

    -
    {% liquid foo.html %}
    +
    {% liquid foo.html %}
    Common Pitfall

    LiquidJS defaults this option to true to be compatible with shopify/liquid, but if you’re from eleventy it’s set to false by default (see Quoted Include Paths) which I believe is trying to be compatible with Jekyll.

    @@ -125,10 +128,18 @@
  • Parameters are under include variable instead of current scope.
  • For example in the following template, name.html is not quoted, header and "HEADER" are separated by =, and the header parameter is referenced by include.header. More details please check out include.

    -
    // entry template
    {% include article.html header="HEADER" content="CONTENT" %}

    // article.html
    <article>
    <header>{{include.header}}</header>
    {{include.content}}
    </article>
    +
    // entry template
    +{% include article.html header="HEADER" content="CONTENT" %}
    +
    +// article.html
    +<article>
    +  <header>{{include.header}}</header>
    +  {{include.content}}
    +</article>

    extname

    extname defines the default extension name to be appended into filenames if the filename has no extension name. Defaults to '' which means it’s disabled by default. By setting it to .liquid:

    -
    {% render "foo" %}  there's no extname, adds `.liquid` and loads foo.liquid
    {% render "foo.html" %} there is an extname already, loads foo.html directly
    +
    {% render "foo" %}  there's no extname, adds `.liquid` and loads foo.liquid
    +{% render "foo.html" %}  there is an extname already, loads foo.html directly
    Legacy Versions

    Before 2.0.1, extname is set to .liquid by default. To change that you need to set extname: '' explicitly. See #41 for details.

    @@ -141,7 +152,7 @@

    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

    greedy, trimOutputLeft, trimOutputRight, trimTagLeft, trimTagRight options are used to eliminate extra newlines and indents in templates around Liquid Constructs. See Whitespace Control for details.

    Delimiter

    outputDelimiterLeft, outputDelimiterRight, tagDelimiterLeft, tagDelimiterRight are used to customize the delimiters for LiquidJS Tags and Filters. For example with outputDelimiterLeft: <%=, outputDelimiterRight: %> we are able to avoid conflicts with other languages:

    -
    <%= username | append: ", welcome to LiquidJS!" %>
    +
    <%= username | append: ", welcome to LiquidJS!" %>

    Strict

    strictFilters is used to assert filter existence. If set to false, undefined filters will be skipped. Otherwise, undefined filters will cause a parse exception. Defaults to false.

    strictVariables is used to assert variable existence. If set to false, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause a render exception. Defaults to false.

    @@ -153,7 +164,7 @@
    - +
    @@ -200,7 +211,7 @@ diff --git a/tutorials/parse-parameters.html b/tutorials/parse-parameters.html index a9ca7ccc5..d7633f40d 100644 --- a/tutorials/parse-parameters.html +++ b/tutorials/parse-parameters.html @@ -77,7 +77,7 @@
    @@ -92,32 +92,76 @@

    Access Raw Parameters

    As covered in Register Filters/Tags, tag parameters is available on tagToken.args as a raw string. For example:

    -
    // Usage: {% random foo bar coo %}
    // Output: "foo", "bar" or "coo"
    engine.registerTag('random', {
    parse(tagToken) {
    // tagToken.args === "foo bar coo"
    this.items = tagToken.args.split(' ')
    },
    render(context, emitter) {
    // get a random index
    const index = Math.floor(this.items.length * Math.random())
    // output that item
    emitter.write(this.items[index])
    }
    })
    +
    // Usage: {% random foo bar coo %}
    +// Output: "foo", "bar" or "coo"
    +engine.registerTag('random', {
    +  parse(tagToken) {
    +    // tagToken.args === "foo bar coo"
    +    this.items = tagToken.args.split(' ')
    +  },
    +  render(context, emitter) {
    +    // get a random index
    +    const index = Math.floor(this.items.length * Math.random())
    +    // output that item
    +    emitter.write(this.items[index])
    +  }
    +})

    Here’s a JSFiddle version: http://jsfiddle.net/ctj364up/2/

    Parse Parameters as Values

    Sometimes we need more dynamic tags and want to pass values to the custom tag instead of static strings. Variables in LiquidJS can be literal (string, number, etc.) or a variable from current context scope.

    The following modified template also contains 3 values to random from, but they’re values instead of static strings. The first one is string literal, second one is an identifier, third one is a property access sequence containing two identifiers.

    -
    {% random "foo" bar obj.coo %}
    +
    {% random "foo" bar obj.coo %}

    It can be tricky to parse all these cases manually, but there’s a Tokenizer class in LiquidJS you can make use of.

    -
    const { Liquid, Tokenizer, evalToken } = require('liquidjs')
    engine.registerTag('random', {
    parse(tagToken) {
    const tokenizer = new Tokenizer(tagToken.args)
    this.items = []
    while (!tokenizer.end()) {
    // here readValue() returns a LiteralToken or PropertyAccessToken
    this.items.push(tokenizer.readValue())
    }
    },
    * render(context, emitter) {
    const index = Math.floor(this.items.length * Math.random())
    const token = this.items[index]
    // in LiquidJS, we use yield to wait for async call
    const value = yield evalToken(token, context)
    emitter.write(value)
    }
    })
    +
    const { Liquid, Tokenizer, evalToken } = require('liquidjs')
    +engine.registerTag('random', {
    +  parse(tagToken) {
    +    const tokenizer = new Tokenizer(tagToken.args)
    +    this.items = []
    +    while (!tokenizer.end()) {
    +      // here readValue() returns a LiteralToken or PropertyAccessToken
    +      this.items.push(tokenizer.readValue())
    +    }
    +  },
    +  * render(context, emitter) {
    +    const index = Math.floor(this.items.length * Math.random())
    +    const token = this.items[index]
    +    // in LiquidJS, we use yield to wait for async call
    +    const value = yield evalToken(token, context)
    +    emitter.write(value)
    +  }
    +})

    Calling this tag in scope { bar: "bar", obj: { coo: "coo" } } yields exactly the same result as the first example. See this JSFiddle: http://jsfiddle.net/ctj364up/3/

    Async ans Promises

    Async calls in LiquidJS are implemented by generators directly, for we can call generators in synchronous manner so this tag implementation is also valid for renderSync(), parseAndRenderSync(), renderFileSync(). If you need to await a promise in tag implementation, simply replace await somePromise with yield somePromise and keep * render() instead of async render() will do the trick. See Sync and Async for more details.

    Parse Key-Value Pairs as Named Parameters

    Named parameters become very handy when there’re optional parameters or lots of parameters, in which case the order of parameters is not important. This is exactly what Hash class is invented for.

    -
    {% random from:2, to:max %}
    +
    {% random from:2, to:max %}

    In the above example, we’re trying to generate a random number in the range [2, max]. We’ll use Hash to parse from and to parameters.

    -
    const { Liquid, Hash } = require('liquidjs')

    engine.registerTag('random', {
    parse(tagToken) {
    // parse the parameters structure into `this.args`
    this.args = new Hash(tagToken.args)
    },
    * render(context, emitter) {
    // evaluate the parameters in `context`
    const {from, to} = yield this.args.render(context)
    const length = to - from + 1
    const value = from + Math.floor(length * Math.random())
    emitter.write(value)
    }
    })
    +
    const { Liquid, Hash } = require('liquidjs')
    +
    +engine.registerTag('random', {
    +  parse(tagToken) {
    +    // parse the parameters structure into `this.args`
    +    this.args = new Hash(tagToken.args)
    +  },
    +  * render(context, emitter) {
    +    // evaluate the parameters in `context`
    +    const {from, to} = yield this.args.render(context)
    +    const length = to - from + 1
    +    const value = from + Math.floor(length * Math.random())
    +    emitter.write(value)
    +  }
    +})

    Rendering {% random from:2, to:max %} in scope { max: 10 } will generate a random number in the range [2, 10]. See this JSFiddle: http://jsfiddle.net/ctj364up/4/

    @@ -163,7 +207,7 @@ diff --git a/tutorials/partials-and-layouts.html b/tutorials/partials-and-layouts.html index dfbd85751..b2fc145f1 100644 --- a/tutorials/partials-and-layouts.html +++ b/tutorials/partials-and-layouts.html @@ -77,7 +77,7 @@
    @@ -92,26 +92,44 @@

    Render Partials

    For the following template files:

    -
    // file: color.liquid
    color: '{{ color }}' shape: '{{ shape }}'

    // file: theme.liquid
    {% assign shape = 'circle' %}
    {% render 'color.liquid' %}
    {% render 'color.liquid' with 'red' %}
    {% render 'color.liquid', color: 'yellow', shape: 'square' %}
    +
    // file: color.liquid
    +color: '{{ color }}' shape: '{{ shape }}'
    +
    +// file: theme.liquid
    +{% assign shape = 'circle' %}
    +{% render 'color.liquid' %}
    +{% render 'color.liquid' with 'red' %}
    +{% render 'color.liquid', color: 'yellow', shape: 'square' %}

    The output will be:

    -
    color: '' shape: 'circle'
    color: 'red' shape: 'circle'
    color: 'yellow' shape: 'square'
    +
    color: '' shape: 'circle'
    +color: 'red' shape: 'circle'
    +color: 'yellow' shape: 'square'

    More details please refer to the render tag.

    The ".liquid" Extension

    The “.liquid” extension in layout, render and include can be omitted if Liquid instance is created using extname: ".liquid" option. See the extname option for details.

    Layout Templates (Extends)

    For the following template files:

    -
    // file: default-layout.liquid
    Header
    {% block content %}My default content{% endblock %}
    Footer

    // file: page.liquid
    {% layout "default-layout.liquid" %}
    {% block content %}My page content{% endblock %}
    +
    // file: default-layout.liquid
    +Header
    +{% block content %}My default content{% endblock %}
    +Footer
    +
    +// file: page.liquid
    +{% layout "default-layout.liquid" %}
    +{% block content %}My page content{% endblock %}

    The output of page.liquid:

    -
    Header
    My page content
    Footer
    +
    Header
    +My page content
    +Footer

    More details please refer to the layout tag.

    - +
    @@ -158,7 +176,7 @@ diff --git a/tutorials/plugins.html b/tutorials/plugins.html index cd1ab5338..4598060fa 100644 --- a/tutorials/plugins.html +++ b/tutorials/plugins.html @@ -77,7 +77,7 @@
    @@ -94,10 +94,22 @@

    A number of tags and filters can be encapsulated into a plugin, which will be typically installed via npm. This article provides information about how to create and use a plugin.

    Write a Plugin

    A liquidjs plugin is simple function which takes the Liquid class as the first parameter and the Liquid instance for this. We can call liquidjs APIs on this to make certain changes, especially register filters and tags.

    Now we’ll make a plugin to upper case every letter of the input, save the following snippet to upup.js:

    -
    /**
    * Inside the plugin function, `this` refers to the Liquid instance.
    *
    * @param Liquid: provides facilities to implement tags and filters.
    */
    module.exports = function (Liquid) {
    this.registerFilter('upup', x => x.toUpperCase());
    }
    +
    /**
    + * Inside the plugin function, `this` refers to the Liquid instance.
    + *
    + * @param Liquid: provides facilities to implement tags and filters.
    + */
    +module.exports = function (Liquid) {
    +    this.registerFilter('upup', x => x.toUpperCase());
    +}

    Use a Plugin

    Simply pass the plugin function into the .plugin() method:

    -
    const engine = new Liquid()

    engine.plugin(require('./upup.js'));
    engine
    .parseAndRender('{{ "foo" | upup }}')
    .then(console.log) // outputs "FOO"
    +
    const engine = new Liquid()
    +
    +engine.plugin(require('./upup.js'));
    +engine
    +    .parseAndRender('{{ "foo" | upup }}')
    +    .then(console.log)  // outputs "FOO"

    Plugin List

    Since this library excludes certain features that are available on the Shopify platform but not on the Shopify/liquid repo, see https://github.com/harttle/liquidjs#differences-and-limitations.

    Here’s a list of plugins that backfill those features. Feel free to add yours, this file is publicly editable.

    @@ -108,7 +120,7 @@
    - +
    @@ -155,7 +167,7 @@ diff --git a/tutorials/register-filters-tags.html b/tutorials/register-filters-tags.html index bc403f681..d2b04873f 100644 --- a/tutorials/register-filters-tags.html +++ b/tutorials/register-filters-tags.html @@ -77,7 +77,7 @@
    @@ -91,24 +91,51 @@
    -

    Register Tags

    // Usage: {% upper name %}
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'

    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args; // name
    },
    render: async function(ctx: Context) {
    var str = await this.liquid.evalValue(this.str, ctx); // 'alice'
    return str.toUpperCase() // 'ALICE'
    }
    });
    +

    Register Tags

    // Usage: {% upper name %}
    +import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'
    +
    +engine.registerTag('upper', {
    +    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    +        this.str = tagToken.args; // name
    +    },
    +    render: async function(ctx: Context) {
    +        var str = await this.liquid.evalValue(this.str, ctx); // 'alice'
    +        return str.toUpperCase() // 'ALICE'
    +    }
    +});
    • parse: Read tokens from remainTokens until your end token.
    • render: Combine scope data with your parsed tokens into HTML string.

    See existing tag implementations here: https://github.com/harttle/liquidjs/tree/master/src/builtin/tags
    See demo example here: https://github.com/harttle/liquidjs/blob/master/demo/typescript/index.ts

    -

    Register Filters

    // Usage: {{ name | upper }}
    engine.registerFilter('upper', v => v.toUpperCase())
    +

    Register Filters

    // Usage: {{ name | upper }}
    +engine.registerFilter('upper', v => v.toUpperCase())

    Filter arguments will be passed to the registered filter function, for example:

    -
    // Usage: {{ 1 | add: 2, 3 }}
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    +
    // Usage: {{ 1 | add: 2, 3 }}
    +engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)

    See existing filter implementations here: https://github.com/harttle/liquidjs/tree/master/src/builtin/filters

    Unregister Tags/Filters

    In some cases it’s desirable to disable some tags/filters (see #324), you’ll need to register a dummy tag/filter in which an corresponding Error throws.

    -
    // disable a tag
    const disabledTag = {
    parse: function(token) {
    throw new Error(`tag "${token.name}" disabled`);
    }
    }
    engine.registerTag('include', disabledTag);

    // disable a filter
    function disabledFilter(name) {
    return function () {
    throw new Error(`filter "${name}" disabled`);
    }
    }
    engine.registerFilter('plus', disabledFilter('plus'));
    +
    // disable a tag
    +const disabledTag = {
    +    parse: function(token) {
    +        throw new Error(`tag "${token.name}" disabled`);
    +    }
    +}
    +engine.registerTag('include', disabledTag);
    +
    +// disable a filter
    +function disabledFilter(name) {
    +    return function () {
    +        throw new Error(`filter "${name}" disabled`);
    +    }
    +}
    +engine.registerFilter('plus', disabledFilter('plus'));
    - +
    @@ -155,7 +182,7 @@ diff --git a/tutorials/render-file.html b/tutorials/render-file.html index 94d51f210..2e5d97207 100644 --- a/tutorials/render-file.html +++ b/tutorials/render-file.html @@ -77,7 +77,7 @@
    @@ -93,17 +93,31 @@

    For a typical project there could be a directory of template files, you’ll need to set the template root and call renderFile or renderFileSync to render a specific file.

    Render a File

    For example you have a directory of templates like this:

    -
    .
    ├── index.js
    └── views/
    ├── hello.liquid
    └── world.liquid
    +
    .
    +├── index.js
    +└── views/
    +  ├── hello.liquid
    +  └── world.liquid

    hello.liquid contains a single line `name: {{name}}`.
    Now save the following contents into index.js:

    -
    var engine = new Liquid({
    root: path.resolve(__dirname, 'views/'), // root for layouts/includes lookup
    extname: '.liquid' // used for layouts/includes, defaults ""
    });
    engine
    .renderFile("hello", {name: 'alice'}) // will read and render `views/hello.liquid`
    .then(console.log) // outputs "Alice"
    +
    var engine = new Liquid({
    +    root: path.resolve(__dirname, 'views/'),  // root for layouts/includes lookup
    +    extname: '.liquid'          // used for layouts/includes, defaults ""
    +});
    +engine
    +    .renderFile("hello", {name: 'alice'})   // will read and render `views/hello.liquid`
    +    .then(console.log)  // outputs "Alice"

    Run node index.js and you’ll get output like this:

    -
    > node index.js
    name: alice
    +
    > node index.js
    +name: alice

    Template Lookup

    Template files names passed to renderFile, parseFile, renderFileSync, parseFileSync APIs,
    and include, layout tags are resolved against the root option.

    It can be a string-typed path (see above example), or a list of root directories, in which case templates will be looked up in that order. e.g.

    -
    var engine = new Liquid({
    root: ['views/', 'views/partials/'],
    extname: '.liquid'
    });
    +
    var engine = new Liquid({
    +    root: ['views/', 'views/partials/'],
    +    extname: '.liquid'
    +});
    Relative Paths

    Relative paths in root will be resolved against cwd().

    @@ -121,7 +135,29 @@

    If fetch fails, a 404/500 error or network failures for example, an ENOENT error will be throwed.
    Here’s a demo for browsers: demo/browser.

    Abstract File System

    LiquidJS defines an abstract file system interface in src/fs/ifs.ts and the default implementation is src/fs/node.ts for Node.js and src/fs/browser.ts for the browser bundle.

    The Liquid constructor provides a fs option to specify the file system implementation. It’s supposed to be used to define customized template fetching logic, i.e. fetch template from a database table, like:

    -
    var engine = new Liquid({
    fs: {
    readFileSync (file) {
    return db.model('Template').findByIdSync(file).text
    },
    async readFile (file) {
    const template = await db.model('Template').findById(file)
    return template.text
    },
    existsSync () {
    return true
    },
    exists () {
    return true
    },
    contains () {
    return true
    },
    resolve(root, file, ext) {
    return file
    }
    }
    });
    +
    var engine = new Liquid({
    +    fs: {
    +        readFileSync (file) {
    +            return db.model('Template').findByIdSync(file).text
    +        },
    +        async readFile (file) {
    +            const template = await db.model('Template').findById(file)
    +            return template.text
    +        },
    +        existsSync () {
    +            return true
    +        },
    +        exists () {
    +            return true
    +        },
    +        contains () {
    +            return true
    +        },
    +        resolve(root, file, ext) {
    +            return file
    +        }
    +    }
    +});
    Path Traversal Vulnerability

    The default value of contains() always returns true. That means when specifying an abstract file system, you’ll need to provide a proper contains() to avoid expose such vulnerabilities.

    @@ -129,7 +165,7 @@
    - +
    @@ -176,7 +212,7 @@ diff --git a/tutorials/render-tag-content.html b/tutorials/render-tag-content.html new file mode 100644 index 000000000..cc613af05 --- /dev/null +++ b/tutorials/render-tag-content.html @@ -0,0 +1,269 @@ + + + + + Render Tag Content | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    +

    Render Tag Content

    + + + +
    +
    +

    Custom tags can have content template and can be nested. This article describes how to implement custom tags that consists of a begin tag, an end tag, and template content between them.

    +

    Render Tag Content

    We’ll start with a simple tag wrap which wraps its content into a <div class="wrapper"></div> element:

    +
    {% wrap %}
    +  {{ "hello world!" | capitalize }}
    +{% endwrap %}
    + +

    Expected output:

    +
    <div class='wrapper'>
    +  Hello world!
    +</div>
    + +

    Firstly, register a tag with name wrap and parse the content into this.tpls. Here in parse(tagToken, remainTokens),

    +
      +
    • tagToken is current token {% wrap %}, and
    • +
    • remainTokens is an array of all tokens following {% wrap %} until the end of this template file.
    • +
    +

    Basically, what we need to do is take/.shift() enough tags from remainTokens until we got a endwrap token (the name can be arbitrary, but in convention, we need it to be endwrap). And if there’s no endwrap until the end of template file, we need to throw an tag-not-closed Error.

    +
    engine.registerTag('wrap', {
    +  parse(tagToken, remainTokens) {
    +    this.tpls = []
    +    let closed = false
    +    while(remainTokens.length) {
    +      let token = remainTokens.shift()
    +      // we got the end tag! stop taking tokens
    +      if (token.name === 'endwrap') {
    +        closed = true
    +        break
    +      }
    +      // parse token into template
    +      // parseToken() may consume more than 1 tokens
    +      // e.g. {% if %}...{% endif %}
    +      let tpl = this.liquid.parser.parseToken(token, remainTokens)
    +      this.tpls.push(tpl)
    +    }
    +    if (!closed) throw new Error(`tag ${tagToken.getText()} not closed`)
    +  },
    +  * render(context, emitter) {
    +    emitter.write("<div class='wrapper'>")
    +    yield this.liquid.renderer.renderTemplates(this.tpls, context, emitter)
    +    emitter.write("</div>")
    +  }
    +})
    + +

    .renderTemplates() can be async, we need yield to wait it complete. More details on async in LiquidJS, please refer to Sync and Async. Other parts of render() method is quite straightforward. Here’s a JSFiddle version: http://jsfiddle.net/por0zcn1/3/

    +

    Using ParseStream

    When it comes to complex tags like for and if, the parse() can be very complicated. There’s a ParseStream utility to organize the parse() in event-based style. Following is a re-written parse() using ParseStream and does exactly the same as above example.

    +
    parse(tagToken, remainTokens) {
    +  this.tpls = []
    +  this.liquid.parser.parseStream(remainTokens)
    +    .on('template', tpl => this.tpls.push(tpl))
    +    // note that we cannot use arrow function because we need `this`
    +    .on('tag:endwrap', function () { this.stop() })
    +    .on('end', () => { throw new Error(`tag ${tagToken.getText()} not closed`) })
    +    .start()
    +}
    + +

    Here’s a JSFiddle version: http://jsfiddle.net/por0zcn1/4/. For simplicity, the following examples are implemented using ParseStream.

    +

    Manipulate the Context

    The wrap tag above doesn’t seem to be very useful, without using that tag we can render the content anyway. Now we’re going to implement a repeat tag to render the content 2 times (we can also add a parameter to render arbitrary times).

    +
    {% repeat %}
    +  {{ repeat.i }}. {{ "hello world!" | capitalize }}
    +{% endrepeat %}`
    + +

    Expected outputs:

    +
    1. Hello world!
    +2. Hello world!
    + +

    As you’ve noticed, there’s an additional repeat.i in the context of repeat. That is implemented by manipulating the Context.

    +
    Context

    Context defines the value of each variable in Liquid template. In LiquidJS, a Context consists of a stack of Scopes. A Scope is a plain object like the one specified in engine.render(tpl, scope).

    +
    + +

    Each time we enter a new Context, we need to push a new Scope. And when we finish rendering and exit the Context, we pop the Scope from the Context. As you can see in the following implementation:

    +
    engine.registerTag('repeat', {
    +  parse(tagToken, remainTokens) {
    +    this.tpls = []
    +    this.liquid.parser.parseStream(remainTokens)
    +      .on('template', tpl => this.tpls.push(tpl))
    +      .on('tag:endrepeat', function () { this.stop() })
    +      .on('end', () => { throw new Error(`tag ${tagToken.getText()} not closed`) })
    +      .start()
    +  },
    +  * render(context, emitter) {
    +    const repeat = { i: 1 }
    +    context.push({ repeat })
    +    yield this.liquid.renderer.renderTemplates(this.tpls, context, emitter)
    +    repeat.i++
    +    yield this.liquid.renderer.renderTemplates(this.tpls, context, emitter)
    +    context.pop()
    +  }
    +})
    + +

    The parse() is exactly the same as wrap tag, we repeat the content simply by calling .renderTemplates(this.tpls) twice during render(). Here’s the JSFiddle: http://jsfiddle.net/por0zcn1/2/

    +
    Use Push & Pop in Pairs

    context.push() and context.pop() have to be used in pairs. Failing to pop() the Scope you pushed will leak the Scope to latter templates and may corrupt the Context stack.

    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/tutorials/setup.html b/tutorials/setup.html index a8977dc8e..081ac703a 100644 --- a/tutorials/setup.html +++ b/tutorials/setup.html @@ -77,7 +77,7 @@
    @@ -93,21 +93,34 @@

    In case you’re not familiar with Liquid Template Language, see Introduction to Liquid Template Language.

    LiquidJS in Node.js

    Install via npm:

    -
    npm install --save liquidjs
    +
    npm install --save liquidjs
    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // outputs 'Alice'
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid();
    +
    +engine
    +    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    +    .then(console.log);     // outputs 'Alice'
    Working Demo

    Here’s a working demo for LiquidJS usage in Node.js: liquidjs/demo/nodejs/.

    Type definitions for LiquidJS are also exported and published, which makes it more enjoyable for TypeScript projects:

    -
    import { Liquid } from 'liquidjs';
    const engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // outputs 'Alice'
    +
    import { Liquid } from 'liquidjs';
    +const engine = new Liquid();
    +
    +engine
    +    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    +    .then(console.log);     // outputs 'Alice'
    Working Demo

    Here’s a working demo for LiquidJS usage in TypeScript: liquidjs/demo/typescript/.

    LiquidJS in Browsers

    Pre-built UMD bundles are also available:

    -
    <!--for production-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
    <!--for development-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script>
    +
    <!--for production-->
    +<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
    +<!--for development-->
    +<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script>
    Working Demo

    Here’s a living demo on jsFiddle: jsfiddle.net/pd4jhzLs/1/, and the source code is also available in liquidjs/demo/browser/.

    @@ -116,16 +129,16 @@

    LiquidJS in CLI

    LiquidJS is also available from CLI:

    -
    echo '{{"hello" | capitalize}}' | npx liquidjs
    +
    echo '{{"hello" | capitalize}}' | npx liquidjs

    If you pass a path to a JSON file or a JSON string as the first argument, it will be used as the context for your template.

    -
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
    +
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'

    Miscellaneous

    A ReactJS demo is also added by @stevenanthonyrevo, see liquidjs/demo/reactjs/.

    - +
    @@ -172,7 +185,7 @@ diff --git a/tutorials/sync-and-async.html b/tutorials/sync-and-async.html index 8dc21c17f..071ead472 100644 --- a/tutorials/sync-and-async.html +++ b/tutorials/sync-and-async.html @@ -77,7 +77,7 @@
    @@ -117,20 +117,48 @@

    Await Promises

    But LiquidJS is Promise-friendly, right? You can still call Promise-based functions and wait for that Promise within tag implementations. Just replace await with yield and keep * render() instead of async render(). e.g.

    -
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'

    // Usage: {% upper "alice" %}
    // Output: ALICE
    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args
    },
    * render: function(ctx: Context) {
    // _evalValue will behave synchronously when called by synchronous API
    // in which case `ctx.sync == true`
    var str = yield this.liquid._evalValue(this.str, ctx)
    return str.toUpperCase()
    }
    })
    +
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'
    +
    +// Usage: {% upper "alice" %}
    +// Output: ALICE
    +engine.registerTag('upper', {
    +    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    +        this.str = tagToken.args
    +    },
    +    * render: function(ctx: Context) {
    +        // _evalValue will behave synchronously when called by synchronous API
    +        // in which case `ctx.sync == true`
    +        var str = yield this.liquid._evalValue(this.str, ctx)
    +        return str.toUpperCase()
    +    }
    +})

    See this JSFiddle: http://jsfiddle.net/ctj364up/6/.

    Async-only Tags

    For tags that intended to be used only by async API, or those cannot be implemented synchronously, there’s no difference between using generator-base syntax or async syntax. I’ll call them async-only tags.

    For example, if the above this.liquid._evalValue() doesn’t respect ctx.sync and always returns a Promise, even if the tag is implemented using * render() and yield this.liquid._evalValue(), it will be rendered as <object Promise> anyway.

    For async-only tags, you can use async syntax at will. Be careful some APIs in LiquidJS return Promises and others return Generators. You’ll need toPromise API to convert a Generator to a Promise, for example:

    -
    import { TagToken, Context, Emitter, TopLevelToken, toPromise } from 'liquidjs'

    // Usage: {% upper "alice" %}
    // Output: ALICE
    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args; // name
    },
    render: async function(ctx: Context) {
    var str = await toPromise(this.liquid._evalValue(this.str, ctx));
    // Or use the alternate API that returns a Promise
    // var str = await this.liquid.evalValue(this.str, ctx);
    return str.toUpperCase()
    }
    });
    +
    import { TagToken, Context, Emitter, TopLevelToken, toPromise } from 'liquidjs'
    +
    +// Usage: {% upper "alice" %}
    +// Output: ALICE
    +engine.registerTag('upper', {
    +    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    +        this.str = tagToken.args; // name
    +    },
    +    render: async function(ctx: Context) {
    +        var str = await toPromise(this.liquid._evalValue(this.str, ctx));
    +        // Or use the alternate API that returns a Promise
    +        // var str = await this.liquid.evalValue(this.str, ctx);
    +        return str.toUpperCase()
    +    }
    +});

    See this JSFiddle: http://jsfiddle.net/ctj364up/5/.

    @@ -176,7 +204,7 @@ diff --git a/tutorials/truthy-and-falsy.html b/tutorials/truthy-and-falsy.html index e69802869..4703750c8 100644 --- a/tutorials/truthy-and-falsy.html +++ b/tutorials/truthy-and-falsy.html @@ -77,7 +77,7 @@
    - +
    @@ -272,7 +272,7 @@ diff --git a/tutorials/use-in-expressjs.html b/tutorials/use-in-expressjs.html index 8969d1e08..7a4544f86 100644 --- a/tutorials/use-in-expressjs.html +++ b/tutorials/use-in-expressjs.html @@ -77,7 +77,7 @@
    @@ -92,27 +92,48 @@

    LiquidJS is compatible to the express template engines. You can set liquidjs instance to the view engine option:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    // register liquid engine
    app.engine('liquid', engine.express());
    app.set('views', './views'); // specify the views directory
    app.set('view engine', 'liquid'); // set liquid to default
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid();
    +
    +// register liquid engine
    +app.engine('liquid', engine.express()); 
    +app.set('views', './views');            // specify the views directory
    +app.set('view engine', 'liquid');       // set liquid to default
    Working Demo

    Here’s a working demo for LiquidJS usage in Express.js: liquidjs/demo/express/.

    Template Lookup

    The root option will continue to work as templates root, as you can see in Render A Template File. Additionally, the views option in express.js (as shown above) will also be respected. Say you have a template directory like:

    -
    .
    ├── views1/
    │ └── hello.liquid
    └── views2/
    └── world.liquid
    +
    .
    +├── views1/
    +│ └── hello.liquid
    +└── views2/
    +  └── world.liquid

    And you’re setting template root for liquidjs to views1 and expressjs to views2:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    root: './views1/'
    });

    app.engine('liquid', engine.express());
    app.set('views', './views2'); // specify the views directory
    app.set('view engine', 'liquid'); // set liquid to default
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid({
    +    root: './views1/'
    +});
    +
    +app.engine('liquid', engine.express()); 
    +app.set('views', './views2');            // specify the views directory
    +app.set('view engine', 'liquid');       // set liquid to default

    Both of hello.liquid and world.liquid can be resolved and rendered:

    -
    res.render('hello')
    res.render('world')
    +
    res.render('hello')
    +res.render('world')

    Caching

    Simply setting the cache option to true will enable template caching, as explained in Caching. It’s recommended to enable cache in production environment, which can be done by:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: process.env.NODE_ENV === 'production'
    });
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid({
    +    cache: process.env.NODE_ENV === 'production'
    +});
    - +
    @@ -159,7 +180,7 @@ diff --git a/tutorials/whitespace-control.html b/tutorials/whitespace-control.html index 8526f622f..6db777911 100644 --- a/tutorials/whitespace-control.html +++ b/tutorials/whitespace-control.html @@ -77,7 +77,7 @@
    @@ -93,16 +93,19 @@

    To keep source code neat and indented, we’re adding spaces to our templates. LiquidJS offers whitespace control capabilities to eliminate these unwanted whitespaces in output HTML.

    via Markups

    By default, all tags and output markups lines will generate a NL (\n), and whitespaces if there’s any indentation. For example:

    -
    {%  author = "harttle" %}
    {{ author }}
    +
    {%  author = "harttle" %}
    +{{ author }}

    Outputs (note the blank link):

    -

    harttle
    +
    
    +harttle

    We can include hyphens in your tag syntax ({{-`, `-}}`, `{%-, -%}) to strip whitespace from left or right. For example:

    -
    {% assign author = "harttle" -%}
    {{ author }}
    +
    {% assign author = "harttle" -%}
    +{{ author }}

    Outputs:

    -
    harttle
    +
    harttle

    In this case, the -%} strips the whitespace from the right side of the assign tag.

    via Options

    Alternatively, LiquidJS provides these per engine options to enable whitespace control without sweeping changes of your templates:

    @@ -117,7 +120,7 @@
    - +
    @@ -164,7 +167,7 @@ diff --git a/zh-cn/api/classes/cache_lru_.lru.html b/zh-cn/api/classes/cache_lru_.lru.html index 9ae834e02..414b94038 100644 --- a/zh-cn/api/classes/cache_lru_.lru.html +++ b/zh-cn/api/classes/cache_lru_.lru.html @@ -206,7 +206,7 @@
    - +
    diff --git a/zh-cn/api/classes/cache_lru_.node.html b/zh-cn/api/classes/cache_lru_.node.html index 46aa5261e..60d3c4149 100644 --- a/zh-cn/api/classes/cache_lru_.node.html +++ b/zh-cn/api/classes/cache_lru_.node.html @@ -137,7 +137,7 @@
    - +
    diff --git a/zh-cn/api/classes/context_context_.context.html b/zh-cn/api/classes/context_context_.context.html index 7b01e9285..9da7e5e4d 100644 --- a/zh-cn/api/classes/context_context_.context.html +++ b/zh-cn/api/classes/context_context_.context.html @@ -307,7 +307,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_blank_drop_.blankdrop.html b/zh-cn/api/classes/drop_blank_drop_.blankdrop.html index 88c9f2999..dfcb5fbfc 100644 --- a/zh-cn/api/classes/drop_blank_drop_.blankdrop.html +++ b/zh-cn/api/classes/drop_blank_drop_.blankdrop.html @@ -160,7 +160,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_block_drop_.blockdrop.html b/zh-cn/api/classes/drop_block_drop_.blockdrop.html index ef7ca899c..40e86499a 100644 --- a/zh-cn/api/classes/drop_block_drop_.blockdrop.html +++ b/zh-cn/api/classes/drop_block_drop_.blockdrop.html @@ -137,7 +137,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_drop_.drop.html b/zh-cn/api/classes/drop_drop_.drop.html index d6e3de71a..2d3170f8e 100644 --- a/zh-cn/api/classes/drop_drop_.drop.html +++ b/zh-cn/api/classes/drop_drop_.drop.html @@ -122,7 +122,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_empty_drop_.emptydrop.html b/zh-cn/api/classes/drop_empty_drop_.emptydrop.html index e66f83d6c..388abadd2 100644 --- a/zh-cn/api/classes/drop_empty_drop_.emptydrop.html +++ b/zh-cn/api/classes/drop_empty_drop_.emptydrop.html @@ -158,7 +158,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html b/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html index a664b82d5..5fecc21b3 100644 --- a/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html +++ b/zh-cn/api/classes/drop_forloop_drop_.forloopdrop.html @@ -182,7 +182,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_null_drop_.nulldrop.html b/zh-cn/api/classes/drop_null_drop_.nulldrop.html index 09b398946..4e88d8962 100644 --- a/zh-cn/api/classes/drop_null_drop_.nulldrop.html +++ b/zh-cn/api/classes/drop_null_drop_.nulldrop.html @@ -157,7 +157,7 @@
    - +
    diff --git a/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html b/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html index 145b9b906..3484048fe 100644 --- a/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html +++ b/zh-cn/api/classes/drop_tablerowloop_drop_.tablerowloopdrop.html @@ -217,7 +217,7 @@
    - +
    diff --git a/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html b/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html index e49e98e6a..d5a1b4cae 100644 --- a/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html +++ b/zh-cn/api/classes/emitters_keeping_type_emitter_.keepingtypeemitter.html @@ -120,7 +120,7 @@
    - +
    diff --git a/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html b/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html index 1b78259b1..e4dd20eda 100644 --- a/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html +++ b/zh-cn/api/classes/emitters_simple_emitter_.simpleemitter.html @@ -120,7 +120,7 @@
    - +
    diff --git a/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html b/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html index 61f8814b5..80537a550 100644 --- a/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html +++ b/zh-cn/api/classes/emitters_streamed_emitter_.streamedemitter.html @@ -144,7 +144,7 @@
    - +
    diff --git a/zh-cn/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html b/zh-cn/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html index cc3de1f8a..bfb32dbe0 100644 --- a/zh-cn/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html +++ b/zh-cn/api/classes/emitters_streamed_emitter_browser_.streamedemitter.html @@ -148,7 +148,7 @@
    - +
    diff --git a/zh-cn/api/classes/fs_loader_.loader.html b/zh-cn/api/classes/fs_loader_.loader.html index 4a8a2c500..8775ca2f4 100644 --- a/zh-cn/api/classes/fs_loader_.loader.html +++ b/zh-cn/api/classes/fs_loader_.loader.html @@ -248,7 +248,7 @@
    - +
    diff --git a/zh-cn/api/classes/liquid_.liquid.html b/zh-cn/api/classes/liquid_.liquid.html index 0667924eb..76421601d 100644 --- a/zh-cn/api/classes/liquid_.liquid.html +++ b/zh-cn/api/classes/liquid_.liquid.html @@ -620,7 +620,7 @@
    - +
    diff --git a/zh-cn/api/classes/parser_parse_stream_.parsestream.html b/zh-cn/api/classes/parser_parse_stream_.parsestream.html index 46cd8a485..260016331 100644 --- a/zh-cn/api/classes/parser_parse_stream_.parsestream.html +++ b/zh-cn/api/classes/parser_parse_stream_.parsestream.html @@ -203,7 +203,7 @@
    - +
    diff --git a/zh-cn/api/classes/parser_parser_.parser.html b/zh-cn/api/classes/parser_parser_.parser.html index 06018d239..982bd9782 100644 --- a/zh-cn/api/classes/parser_parser_.parser.html +++ b/zh-cn/api/classes/parser_parser_.parser.html @@ -296,7 +296,7 @@
    - +
    diff --git a/zh-cn/api/classes/parser_tokenizer_.tokenizer.html b/zh-cn/api/classes/parser_tokenizer_.tokenizer.html index 38864480a..f8af92837 100644 --- a/zh-cn/api/classes/parser_tokenizer_.tokenizer.html +++ b/zh-cn/api/classes/parser_tokenizer_.tokenizer.html @@ -562,7 +562,7 @@
    - +
    diff --git a/zh-cn/api/classes/render_expression_.expression.html b/zh-cn/api/classes/render_expression_.expression.html index 206b373a7..8661e9846 100644 --- a/zh-cn/api/classes/render_expression_.expression.html +++ b/zh-cn/api/classes/render_expression_.expression.html @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/classes/render_render_.render.html b/zh-cn/api/classes/render_render_.render.html index 0788513cc..8ba0c2db2 100644 --- a/zh-cn/api/classes/render_render_.render.html +++ b/zh-cn/api/classes/render_render_.render.html @@ -142,7 +142,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_filter_filter_.filter.html b/zh-cn/api/classes/template_filter_filter_.filter.html index 612e9e75c..ff7413738 100644 --- a/zh-cn/api/classes/template_filter_filter_.filter.html +++ b/zh-cn/api/classes/template_filter_filter_.filter.html @@ -156,7 +156,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_filter_filter_map_.filtermap.html b/zh-cn/api/classes/template_filter_filter_map_.filtermap.html index f59d7584c..5761b6569 100644 --- a/zh-cn/api/classes/template_filter_filter_map_.filtermap.html +++ b/zh-cn/api/classes/template_filter_filter_map_.filtermap.html @@ -186,7 +186,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_html_.html.html b/zh-cn/api/classes/template_html_.html.html index cb3131106..72f61b979 100644 --- a/zh-cn/api/classes/template_html_.html.html +++ b/zh-cn/api/classes/template_html_.html.html @@ -147,7 +147,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_output_.output.html b/zh-cn/api/classes/template_output_.output.html index 53c2bfeb7..a4bfc301c 100644 --- a/zh-cn/api/classes/template_output_.output.html +++ b/zh-cn/api/classes/template_output_.output.html @@ -151,7 +151,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_tag_hash_.hash.html b/zh-cn/api/classes/template_tag_hash_.hash.html index 5d763d386..d11dddc77 100644 --- a/zh-cn/api/classes/template_tag_hash_.hash.html +++ b/zh-cn/api/classes/template_tag_hash_.hash.html @@ -136,7 +136,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_tag_tag_.tag.html b/zh-cn/api/classes/template_tag_tag_.tag.html index ebae35082..9ddb4816f 100644 --- a/zh-cn/api/classes/template_tag_tag_.tag.html +++ b/zh-cn/api/classes/template_tag_tag_.tag.html @@ -158,7 +158,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_tag_tag_map_.tagmap.html b/zh-cn/api/classes/template_tag_tag_map_.tagmap.html index 812cddade..f84daa886 100644 --- a/zh-cn/api/classes/template_tag_tag_map_.tagmap.html +++ b/zh-cn/api/classes/template_tag_tag_map_.tagmap.html @@ -139,7 +139,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_template_impl_.templateimpl.html b/zh-cn/api/classes/template_template_impl_.templateimpl.html index 849b719b8..29bcfa5a1 100644 --- a/zh-cn/api/classes/template_template_impl_.templateimpl.html +++ b/zh-cn/api/classes/template_template_impl_.templateimpl.html @@ -120,7 +120,7 @@
    - +
    diff --git a/zh-cn/api/classes/template_value_.value.html b/zh-cn/api/classes/template_value_.value.html index 87332e708..4a07b16dc 100644 --- a/zh-cn/api/classes/template_value_.value.html +++ b/zh-cn/api/classes/template_value_.value.html @@ -145,7 +145,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html b/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html index e56f6a3b5..5381c9032 100644 --- a/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html +++ b/zh-cn/api/classes/tokens_delimited_token_.delimitedtoken.html @@ -189,7 +189,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_filter_token_.filtertoken.html b/zh-cn/api/classes/tokens_filter_token_.filtertoken.html index ccc3e6374..1d4c6d3e6 100644 --- a/zh-cn/api/classes/tokens_filter_token_.filtertoken.html +++ b/zh-cn/api/classes/tokens_filter_token_.filtertoken.html @@ -175,7 +175,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_hash_token_.hashtoken.html b/zh-cn/api/classes/tokens_hash_token_.hashtoken.html index 52617b6fc..320d8f495 100644 --- a/zh-cn/api/classes/tokens_hash_token_.hashtoken.html +++ b/zh-cn/api/classes/tokens_hash_token_.hashtoken.html @@ -175,7 +175,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_html_token_.htmltoken.html b/zh-cn/api/classes/tokens_html_token_.htmltoken.html index 01b53c4cd..3fdc7528f 100644 --- a/zh-cn/api/classes/tokens_html_token_.htmltoken.html +++ b/zh-cn/api/classes/tokens_html_token_.htmltoken.html @@ -171,7 +171,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html b/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html index 97cff4457..038b185e7 100644 --- a/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html +++ b/zh-cn/api/classes/tokens_identifier_token_.identifiertoken.html @@ -183,7 +183,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html b/zh-cn/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html index 68da1ccf1..78baa3bf2 100644 --- a/zh-cn/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html +++ b/zh-cn/api/classes/tokens_liquid_tag_token_.liquidtagtoken.html @@ -180,7 +180,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_literal_token_.literaltoken.html b/zh-cn/api/classes/tokens_literal_token_.literaltoken.html index f346bdf00..66aa2c34b 100644 --- a/zh-cn/api/classes/tokens_literal_token_.literaltoken.html +++ b/zh-cn/api/classes/tokens_literal_token_.literaltoken.html @@ -164,7 +164,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_number_token_.numbertoken.html b/zh-cn/api/classes/tokens_number_token_.numbertoken.html index 919ff36ee..cb5f2ca4f 100644 --- a/zh-cn/api/classes/tokens_number_token_.numbertoken.html +++ b/zh-cn/api/classes/tokens_number_token_.numbertoken.html @@ -159,7 +159,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_operator_token_.operatortoken.html b/zh-cn/api/classes/tokens_operator_token_.operatortoken.html index 5c7d7acf4..47d8cfa20 100644 --- a/zh-cn/api/classes/tokens_operator_token_.operatortoken.html +++ b/zh-cn/api/classes/tokens_operator_token_.operatortoken.html @@ -168,7 +168,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_output_token_.outputtoken.html b/zh-cn/api/classes/tokens_output_token_.outputtoken.html index 84921eb82..4c8f79ef0 100644 --- a/zh-cn/api/classes/tokens_output_token_.outputtoken.html +++ b/zh-cn/api/classes/tokens_output_token_.outputtoken.html @@ -174,7 +174,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html b/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html index 095c2e52b..4550f0f94 100644 --- a/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html +++ b/zh-cn/api/classes/tokens_property_access_token_.propertyaccesstoken.html @@ -166,7 +166,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html b/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html index 183c5856a..884d2793d 100644 --- a/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html +++ b/zh-cn/api/classes/tokens_quoted_token_.quotedtoken.html @@ -161,7 +161,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_range_token_.rangetoken.html b/zh-cn/api/classes/tokens_range_token_.rangetoken.html index cd01130ba..da964d148 100644 --- a/zh-cn/api/classes/tokens_range_token_.rangetoken.html +++ b/zh-cn/api/classes/tokens_range_token_.rangetoken.html @@ -175,7 +175,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_tag_token_.tagtoken.html b/zh-cn/api/classes/tokens_tag_token_.tagtoken.html index a0f28776e..aebc68a69 100644 --- a/zh-cn/api/classes/tokens_tag_token_.tagtoken.html +++ b/zh-cn/api/classes/tokens_tag_token_.tagtoken.html @@ -180,7 +180,7 @@
    - +
    diff --git a/zh-cn/api/classes/tokens_token_.token.html b/zh-cn/api/classes/tokens_token_.token.html index 8f201215b..126f17507 100644 --- a/zh-cn/api/classes/tokens_token_.token.html +++ b/zh-cn/api/classes/tokens_token_.token.html @@ -166,7 +166,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.assertionerror.html b/zh-cn/api/classes/util_error_.assertionerror.html index 71259af15..e1dd87dd5 100644 --- a/zh-cn/api/classes/util_error_.assertionerror.html +++ b/zh-cn/api/classes/util_error_.assertionerror.html @@ -130,7 +130,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html b/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html index e9a3a158b..a22be49d6 100644 --- a/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html +++ b/zh-cn/api/classes/util_error_.internalundefinedvariableerror.html @@ -133,7 +133,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.liquiderror.html b/zh-cn/api/classes/util_error_.liquiderror.html index 6e6bddb89..8f476977c 100644 --- a/zh-cn/api/classes/util_error_.liquiderror.html +++ b/zh-cn/api/classes/util_error_.liquiderror.html @@ -150,7 +150,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.parseerror.html b/zh-cn/api/classes/util_error_.parseerror.html index fb7e51b31..3c451d235 100644 --- a/zh-cn/api/classes/util_error_.parseerror.html +++ b/zh-cn/api/classes/util_error_.parseerror.html @@ -136,7 +136,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.rendererror.html b/zh-cn/api/classes/util_error_.rendererror.html index e384c6bbb..19095f447 100644 --- a/zh-cn/api/classes/util_error_.rendererror.html +++ b/zh-cn/api/classes/util_error_.rendererror.html @@ -153,7 +153,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.tokenizationerror.html b/zh-cn/api/classes/util_error_.tokenizationerror.html index f38065855..07cbc1269 100644 --- a/zh-cn/api/classes/util_error_.tokenizationerror.html +++ b/zh-cn/api/classes/util_error_.tokenizationerror.html @@ -136,7 +136,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_error_.undefinedvariableerror.html b/zh-cn/api/classes/util_error_.undefinedvariableerror.html index 68ef2cfa1..82483827b 100644 --- a/zh-cn/api/classes/util_error_.undefinedvariableerror.html +++ b/zh-cn/api/classes/util_error_.undefinedvariableerror.html @@ -136,7 +136,7 @@
    - +
    diff --git a/zh-cn/api/classes/util_timezone_date_.timezonedate.html b/zh-cn/api/classes/util_timezone_date_.timezonedate.html index 44c6e9a9d..583225231 100644 --- a/zh-cn/api/classes/util_timezone_date_.timezonedate.html +++ b/zh-cn/api/classes/util_timezone_date_.timezonedate.html @@ -238,7 +238,7 @@
    - +
    diff --git a/zh-cn/api/enums/context_block_mode_.blockmode.html b/zh-cn/api/enums/context_block_mode_.blockmode.html index 836481477..7e0e6ca54 100644 --- a/zh-cn/api/enums/context_block_mode_.blockmode.html +++ b/zh-cn/api/enums/context_block_mode_.blockmode.html @@ -99,7 +99,7 @@
    - +
    diff --git a/zh-cn/api/enums/fs_loader_.lookuptype.html b/zh-cn/api/enums/fs_loader_.lookuptype.html index 48f42b9b1..ab4cb5e9b 100644 --- a/zh-cn/api/enums/fs_loader_.lookuptype.html +++ b/zh-cn/api/enums/fs_loader_.lookuptype.html @@ -102,7 +102,7 @@
    - +
    diff --git a/zh-cn/api/enums/parser_token_kind_.tokenkind.html b/zh-cn/api/enums/parser_token_kind_.tokenkind.html index df88a0193..075fddeb3 100644 --- a/zh-cn/api/enums/parser_token_kind_.tokenkind.html +++ b/zh-cn/api/enums/parser_token_kind_.tokenkind.html @@ -132,7 +132,7 @@
    - +
    diff --git a/zh-cn/api/globals.html b/zh-cn/api/globals.html index f4cb8bac6..c2402061a 100644 --- a/zh-cn/api/globals.html +++ b/zh-cn/api/globals.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/cache_cache_.cache.html b/zh-cn/api/interfaces/cache_cache_.cache.html index 420383b69..c672c10b3 100644 --- a/zh-cn/api/interfaces/cache_cache_.cache.html +++ b/zh-cn/api/interfaces/cache_cache_.cache.html @@ -155,7 +155,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/context_scope_.plainobject.html b/zh-cn/api/interfaces/context_scope_.plainobject.html index 46e1c7678..5d91aeee1 100644 --- a/zh-cn/api/interfaces/context_scope_.plainobject.html +++ b/zh-cn/api/interfaces/context_scope_.plainobject.html @@ -102,7 +102,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/drop_comparable_.comparable.html b/zh-cn/api/interfaces/drop_comparable_.comparable.html index 43acef748..85453110c 100644 --- a/zh-cn/api/interfaces/drop_comparable_.comparable.html +++ b/zh-cn/api/interfaces/drop_comparable_.comparable.html @@ -186,7 +186,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/emitters_emitter_.emitter.html b/zh-cn/api/interfaces/emitters_emitter_.emitter.html index d48a290df..f80d26224 100644 --- a/zh-cn/api/interfaces/emitters_emitter_.emitter.html +++ b/zh-cn/api/interfaces/emitters_emitter_.emitter.html @@ -125,7 +125,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/fs_fs_.fs.html b/zh-cn/api/interfaces/fs_fs_.fs.html index 962da0688..fdf3c13e0 100644 --- a/zh-cn/api/interfaces/fs_fs_.fs.html +++ b/zh-cn/api/interfaces/fs_fs_.fs.html @@ -210,7 +210,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/fs_loader_.loaderoptions.html b/zh-cn/api/interfaces/fs_loader_.loaderoptions.html index 7a112eca1..594fac036 100644 --- a/zh-cn/api/interfaces/fs_loader_.loaderoptions.html +++ b/zh-cn/api/interfaces/fs_loader_.loaderoptions.html @@ -114,7 +114,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/liquid_options_.liquidoptions.html b/zh-cn/api/interfaces/liquid_options_.liquidoptions.html index d0b5a5948..ea95ca62e 100644 --- a/zh-cn/api/interfaces/liquid_options_.liquidoptions.html +++ b/zh-cn/api/interfaces/liquid_options_.liquidoptions.html @@ -222,7 +222,7 @@ Strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`
    - +
    diff --git a/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html b/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html index 99e7d51cf..b21571f98 100644 --- a/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html +++ b/zh-cn/api/interfaces/liquid_options_.normalizedfulloptions.html @@ -213,7 +213,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html b/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html index 9ca0d4604..6811daef6 100644 --- a/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html +++ b/zh-cn/api/interfaces/liquid_options_.normalizedoptions.html @@ -252,7 +252,7 @@ Strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`
    - +
    diff --git a/zh-cn/api/interfaces/liquid_options_.renderoptions.html b/zh-cn/api/interfaces/liquid_options_.renderoptions.html index 40d44196a..5d347be8c 100644 --- a/zh-cn/api/interfaces/liquid_options_.renderoptions.html +++ b/zh-cn/api/interfaces/liquid_options_.renderoptions.html @@ -108,7 +108,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/render_operator_.operators.html b/zh-cn/api/interfaces/render_operator_.operators.html index d656c159b..7a7bd73b2 100644 --- a/zh-cn/api/interfaces/render_operator_.operators.html +++ b/zh-cn/api/interfaces/render_operator_.operators.html @@ -122,7 +122,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html b/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html index f20ce3a0c..84499ac69 100644 --- a/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html +++ b/zh-cn/api/interfaces/template_filter_filter_impl_.filterimpl.html @@ -102,7 +102,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html b/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html index c68640162..e90f97fd5 100644 --- a/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html +++ b/zh-cn/api/interfaces/template_filter_filter_impl_options_.filterimploptions.html @@ -121,7 +121,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_tag_hash_.hashvalue.html b/zh-cn/api/interfaces/template_tag_hash_.hashvalue.html index 66b55019e..01d868836 100644 --- a/zh-cn/api/interfaces/template_tag_hash_.hashvalue.html +++ b/zh-cn/api/interfaces/template_tag_hash_.hashvalue.html @@ -100,7 +100,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html b/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html index 9a9adea5f..bb63b4170 100644 --- a/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html +++ b/zh-cn/api/interfaces/template_tag_tag_impl_.tagimpl.html @@ -138,7 +138,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html b/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html index 5398327fd..a5f6a7f1d 100644 --- a/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html +++ b/zh-cn/api/interfaces/template_tag_tag_impl_options_.tagimploptions.html @@ -130,7 +130,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/template_template_.template.html b/zh-cn/api/interfaces/template_template_.template.html index 95bbf0b8d..e69eee28f 100644 --- a/zh-cn/api/interfaces/template_template_.template.html +++ b/zh-cn/api/interfaces/template_template_.template.html @@ -124,7 +124,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/util_async_.thenable.html b/zh-cn/api/interfaces/util_async_.thenable.html index 50239fa33..91e54d7a6 100644 --- a/zh-cn/api/interfaces/util_async_.thenable.html +++ b/zh-cn/api/interfaces/util_async_.thenable.html @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/util_liquid_date_.liquiddate.html b/zh-cn/api/interfaces/util_liquid_date_.liquiddate.html index 41b55568d..3df556e97 100644 --- a/zh-cn/api/interfaces/util_liquid_date_.liquiddate.html +++ b/zh-cn/api/interfaces/util_liquid_date_.liquiddate.html @@ -148,7 +148,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/util_operator_trie_.trie.html b/zh-cn/api/interfaces/util_operator_trie_.trie.html index 47c574f95..6f3f5b3d2 100644 --- a/zh-cn/api/interfaces/util_operator_trie_.trie.html +++ b/zh-cn/api/interfaces/util_operator_trie_.trie.html @@ -100,7 +100,7 @@
    - +
    diff --git a/zh-cn/api/interfaces/util_strftime_.formatoptions.html b/zh-cn/api/interfaces/util_strftime_.formatoptions.html index 08a8b547c..59225baaf 100644 --- a/zh-cn/api/interfaces/util_strftime_.formatoptions.html +++ b/zh-cn/api/interfaces/util_strftime_.formatoptions.html @@ -105,7 +105,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_array_.html b/zh-cn/api/modules/builtin_filters_array_.html index b4c76f3ca..633704d04 100644 --- a/zh-cn/api/modules/builtin_filters_array_.html +++ b/zh-cn/api/modules/builtin_filters_array_.html @@ -362,7 +362,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_date_.html b/zh-cn/api/modules/builtin_filters_date_.html index cecb7d08f..b3756eb99 100644 --- a/zh-cn/api/modules/builtin_filters_date_.html +++ b/zh-cn/api/modules/builtin_filters_date_.html @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_html_.html b/zh-cn/api/modules/builtin_filters_html_.html index 5ab926968..4b1e0d810 100644 --- a/zh-cn/api/modules/builtin_filters_html_.html +++ b/zh-cn/api/modules/builtin_filters_html_.html @@ -201,7 +201,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_index_.html b/zh-cn/api/modules/builtin_filters_index_.html index 160bff4d0..0794cc22b 100644 --- a/zh-cn/api/modules/builtin_filters_index_.html +++ b/zh-cn/api/modules/builtin_filters_index_.html @@ -191,7 +191,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_math_.html b/zh-cn/api/modules/builtin_filters_math_.html index be8d0fb89..f2831c152 100644 --- a/zh-cn/api/modules/builtin_filters_math_.html +++ b/zh-cn/api/modules/builtin_filters_math_.html @@ -257,7 +257,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_object_.html b/zh-cn/api/modules/builtin_filters_object_.html index 339431872..e6b8bd166 100644 --- a/zh-cn/api/modules/builtin_filters_object_.html +++ b/zh-cn/api/modules/builtin_filters_object_.html @@ -142,7 +142,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_string_.html b/zh-cn/api/modules/builtin_filters_string_.html index 31114b859..4eec117a9 100644 --- a/zh-cn/api/modules/builtin_filters_string_.html +++ b/zh-cn/api/modules/builtin_filters_string_.html @@ -425,7 +425,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_filters_url_.html b/zh-cn/api/modules/builtin_filters_url_.html index 41deb2497..c7b774236 100644 --- a/zh-cn/api/modules/builtin_filters_url_.html +++ b/zh-cn/api/modules/builtin_filters_url_.html @@ -127,7 +127,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_assign_.html b/zh-cn/api/modules/builtin_tags_assign_.html index bcb414e35..1738d4fbe 100644 --- a/zh-cn/api/modules/builtin_tags_assign_.html +++ b/zh-cn/api/modules/builtin_tags_assign_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_block_.html b/zh-cn/api/modules/builtin_tags_block_.html index bf28e7c5b..b5c86c1aa 100644 --- a/zh-cn/api/modules/builtin_tags_block_.html +++ b/zh-cn/api/modules/builtin_tags_block_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_break_.html b/zh-cn/api/modules/builtin_tags_break_.html index 091702d0a..4ffa84db3 100644 --- a/zh-cn/api/modules/builtin_tags_break_.html +++ b/zh-cn/api/modules/builtin_tags_break_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_capture_.html b/zh-cn/api/modules/builtin_tags_capture_.html index fd41b1682..6aeb50d6f 100644 --- a/zh-cn/api/modules/builtin_tags_capture_.html +++ b/zh-cn/api/modules/builtin_tags_capture_.html @@ -110,7 +110,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_case_.html b/zh-cn/api/modules/builtin_tags_case_.html index cf10bbc63..c8aaf1495 100644 --- a/zh-cn/api/modules/builtin_tags_case_.html +++ b/zh-cn/api/modules/builtin_tags_case_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_comment_.html b/zh-cn/api/modules/builtin_tags_comment_.html index 9ca3f6b8f..b2adbdec5 100644 --- a/zh-cn/api/modules/builtin_tags_comment_.html +++ b/zh-cn/api/modules/builtin_tags_comment_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_continue_.html b/zh-cn/api/modules/builtin_tags_continue_.html index 4cf0d926e..ef9173a24 100644 --- a/zh-cn/api/modules/builtin_tags_continue_.html +++ b/zh-cn/api/modules/builtin_tags_continue_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_cycle_.html b/zh-cn/api/modules/builtin_tags_cycle_.html index a83869368..f99ddfff8 100644 --- a/zh-cn/api/modules/builtin_tags_cycle_.html +++ b/zh-cn/api/modules/builtin_tags_cycle_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_decrement_.html b/zh-cn/api/modules/builtin_tags_decrement_.html index 1c852b6b5..47bf1678b 100644 --- a/zh-cn/api/modules/builtin_tags_decrement_.html +++ b/zh-cn/api/modules/builtin_tags_decrement_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_echo_.html b/zh-cn/api/modules/builtin_tags_echo_.html index 20d7fb547..8c47ae159 100644 --- a/zh-cn/api/modules/builtin_tags_echo_.html +++ b/zh-cn/api/modules/builtin_tags_echo_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_for_.html b/zh-cn/api/modules/builtin_tags_for_.html index a139f722e..817add1bc 100644 --- a/zh-cn/api/modules/builtin_tags_for_.html +++ b/zh-cn/api/modules/builtin_tags_for_.html @@ -162,7 +162,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_if_.html b/zh-cn/api/modules/builtin_tags_if_.html index 2b0906041..200ae3449 100644 --- a/zh-cn/api/modules/builtin_tags_if_.html +++ b/zh-cn/api/modules/builtin_tags_if_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_include_.html b/zh-cn/api/modules/builtin_tags_include_.html index f0bdf2570..d174bef69 100644 --- a/zh-cn/api/modules/builtin_tags_include_.html +++ b/zh-cn/api/modules/builtin_tags_include_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_increment_.html b/zh-cn/api/modules/builtin_tags_increment_.html index 90c77cfcc..42fac79b4 100644 --- a/zh-cn/api/modules/builtin_tags_increment_.html +++ b/zh-cn/api/modules/builtin_tags_increment_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_index_.html b/zh-cn/api/modules/builtin_tags_index_.html index 6af89e74d..f94ae91ed 100644 --- a/zh-cn/api/modules/builtin_tags_index_.html +++ b/zh-cn/api/modules/builtin_tags_index_.html @@ -149,7 +149,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_layout_.html b/zh-cn/api/modules/builtin_tags_layout_.html index 63fe83809..d008d63bf 100644 --- a/zh-cn/api/modules/builtin_tags_layout_.html +++ b/zh-cn/api/modules/builtin_tags_layout_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_liquid_.html b/zh-cn/api/modules/builtin_tags_liquid_.html index 817120ed0..b9b9b51f8 100644 --- a/zh-cn/api/modules/builtin_tags_liquid_.html +++ b/zh-cn/api/modules/builtin_tags_liquid_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_raw_.html b/zh-cn/api/modules/builtin_tags_raw_.html index f9c6f9149..a4c0de410 100644 --- a/zh-cn/api/modules/builtin_tags_raw_.html +++ b/zh-cn/api/modules/builtin_tags_raw_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_render_.html b/zh-cn/api/modules/builtin_tags_render_.html index 1a4bed22b..fd5edb152 100644 --- a/zh-cn/api/modules/builtin_tags_render_.html +++ b/zh-cn/api/modules/builtin_tags_render_.html @@ -160,7 +160,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_tablerow_.html b/zh-cn/api/modules/builtin_tags_tablerow_.html index 2a49813c8..e5a6f7726 100644 --- a/zh-cn/api/modules/builtin_tags_tablerow_.html +++ b/zh-cn/api/modules/builtin_tags_tablerow_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/builtin_tags_unless_.html b/zh-cn/api/modules/builtin_tags_unless_.html index 8a7d618ca..d8db8170d 100644 --- a/zh-cn/api/modules/builtin_tags_unless_.html +++ b/zh-cn/api/modules/builtin_tags_unless_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/cache_cache_.html b/zh-cn/api/modules/cache_cache_.html index 5e9921045..574c3c39f 100644 --- a/zh-cn/api/modules/cache_cache_.html +++ b/zh-cn/api/modules/cache_cache_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/cache_lru_.html b/zh-cn/api/modules/cache_lru_.html index 843054e18..a15e81f6b 100644 --- a/zh-cn/api/modules/cache_lru_.html +++ b/zh-cn/api/modules/cache_lru_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/context_block_mode_.html b/zh-cn/api/modules/context_block_mode_.html index 9c3b3fd25..1f9ab1e18 100644 --- a/zh-cn/api/modules/context_block_mode_.html +++ b/zh-cn/api/modules/context_block_mode_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/context_context_.html b/zh-cn/api/modules/context_context_.html index bc07cc9dd..7b8491a6f 100644 --- a/zh-cn/api/modules/context_context_.html +++ b/zh-cn/api/modules/context_context_.html @@ -165,7 +165,7 @@
    - +
    diff --git a/zh-cn/api/modules/context_scope_.html b/zh-cn/api/modules/context_scope_.html index 6d809af7f..b53fb4129 100644 --- a/zh-cn/api/modules/context_scope_.html +++ b/zh-cn/api/modules/context_scope_.html @@ -96,7 +96,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_blank_drop_.html b/zh-cn/api/modules/drop_blank_drop_.html index 0498a1fb3..a1732abfb 100644 --- a/zh-cn/api/modules/drop_blank_drop_.html +++ b/zh-cn/api/modules/drop_blank_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_block_drop_.html b/zh-cn/api/modules/drop_block_drop_.html index dcb1f654e..587b0dfbf 100644 --- a/zh-cn/api/modules/drop_block_drop_.html +++ b/zh-cn/api/modules/drop_block_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_comparable_.html b/zh-cn/api/modules/drop_comparable_.html index cb97accaf..d800d65be 100644 --- a/zh-cn/api/modules/drop_comparable_.html +++ b/zh-cn/api/modules/drop_comparable_.html @@ -110,7 +110,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_drop_.html b/zh-cn/api/modules/drop_drop_.html index b8a764417..9e7d0eb11 100644 --- a/zh-cn/api/modules/drop_drop_.html +++ b/zh-cn/api/modules/drop_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_empty_drop_.html b/zh-cn/api/modules/drop_empty_drop_.html index c55239a1f..581c1e8f4 100644 --- a/zh-cn/api/modules/drop_empty_drop_.html +++ b/zh-cn/api/modules/drop_empty_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_forloop_drop_.html b/zh-cn/api/modules/drop_forloop_drop_.html index 6573ac885..7a8b5e3d2 100644 --- a/zh-cn/api/modules/drop_forloop_drop_.html +++ b/zh-cn/api/modules/drop_forloop_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_null_drop_.html b/zh-cn/api/modules/drop_null_drop_.html index 167943778..4f8ba7b45 100644 --- a/zh-cn/api/modules/drop_null_drop_.html +++ b/zh-cn/api/modules/drop_null_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/drop_tablerowloop_drop_.html b/zh-cn/api/modules/drop_tablerowloop_drop_.html index 4dc0fbca2..f16198b69 100644 --- a/zh-cn/api/modules/drop_tablerowloop_drop_.html +++ b/zh-cn/api/modules/drop_tablerowloop_drop_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/emitters_emitter_.html b/zh-cn/api/modules/emitters_emitter_.html index e4fe82f4b..a0ca53d6f 100644 --- a/zh-cn/api/modules/emitters_emitter_.html +++ b/zh-cn/api/modules/emitters_emitter_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/emitters_keeping_type_emitter_.html b/zh-cn/api/modules/emitters_keeping_type_emitter_.html index b00a9c902..23baf5627 100644 --- a/zh-cn/api/modules/emitters_keeping_type_emitter_.html +++ b/zh-cn/api/modules/emitters_keeping_type_emitter_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/emitters_simple_emitter_.html b/zh-cn/api/modules/emitters_simple_emitter_.html index 1c0b2ce5d..1836f7b27 100644 --- a/zh-cn/api/modules/emitters_simple_emitter_.html +++ b/zh-cn/api/modules/emitters_simple_emitter_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/emitters_streamed_emitter_.html b/zh-cn/api/modules/emitters_streamed_emitter_.html index d2d84c733..51a197033 100644 --- a/zh-cn/api/modules/emitters_streamed_emitter_.html +++ b/zh-cn/api/modules/emitters_streamed_emitter_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/emitters_streamed_emitter_browser_.html b/zh-cn/api/modules/emitters_streamed_emitter_browser_.html index 4341a4ab2..b9de611e7 100644 --- a/zh-cn/api/modules/emitters_streamed_emitter_browser_.html +++ b/zh-cn/api/modules/emitters_streamed_emitter_browser_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/fs_browser_.html b/zh-cn/api/modules/fs_browser_.html index f345540e4..37fa50eb0 100644 --- a/zh-cn/api/modules/fs_browser_.html +++ b/zh-cn/api/modules/fs_browser_.html @@ -226,7 +226,7 @@
    - +
    diff --git a/zh-cn/api/modules/fs_fs_.html b/zh-cn/api/modules/fs_fs_.html index 959ebc147..fe0db02ff 100644 --- a/zh-cn/api/modules/fs_fs_.html +++ b/zh-cn/api/modules/fs_fs_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/fs_loader_.html b/zh-cn/api/modules/fs_loader_.html index 6b0cc0d6f..407952dcf 100644 --- a/zh-cn/api/modules/fs_loader_.html +++ b/zh-cn/api/modules/fs_loader_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/fs_node_.html b/zh-cn/api/modules/fs_node_.html index fe7718951..ed236a65f 100644 --- a/zh-cn/api/modules/fs_node_.html +++ b/zh-cn/api/modules/fs_node_.html @@ -279,7 +279,7 @@
    - +
    diff --git a/zh-cn/api/modules/liquid_.html b/zh-cn/api/modules/liquid_.html index 637512876..ae9844734 100644 --- a/zh-cn/api/modules/liquid_.html +++ b/zh-cn/api/modules/liquid_.html @@ -173,7 +173,7 @@
    - +
    diff --git a/zh-cn/api/modules/liquid_options_.html b/zh-cn/api/modules/liquid_options_.html index 9133edf6d..40f19e1ee 100644 --- a/zh-cn/api/modules/liquid_options_.html +++ b/zh-cn/api/modules/liquid_options_.html @@ -214,7 +214,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_filter_arg_.html b/zh-cn/api/modules/parser_filter_arg_.html index 7a4173322..906cb9113 100644 --- a/zh-cn/api/modules/parser_filter_arg_.html +++ b/zh-cn/api/modules/parser_filter_arg_.html @@ -115,7 +115,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_match_operator_.html b/zh-cn/api/modules/parser_match_operator_.html index 243c7876e..40f492a12 100644 --- a/zh-cn/api/modules/parser_match_operator_.html +++ b/zh-cn/api/modules/parser_match_operator_.html @@ -127,7 +127,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_parse_stream_.html b/zh-cn/api/modules/parser_parse_stream_.html index c4b1c94c9..b7eed5a20 100644 --- a/zh-cn/api/modules/parser_parse_stream_.html +++ b/zh-cn/api/modules/parser_parse_stream_.html @@ -114,7 +114,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_parse_string_literal_.html b/zh-cn/api/modules/parser_parse_string_literal_.html index 599818e55..82d287369 100644 --- a/zh-cn/api/modules/parser_parse_string_literal_.html +++ b/zh-cn/api/modules/parser_parse_string_literal_.html @@ -145,7 +145,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_parser_.html b/zh-cn/api/modules/parser_parser_.html index 6681817ba..b8d45f332 100644 --- a/zh-cn/api/modules/parser_parser_.html +++ b/zh-cn/api/modules/parser_parser_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_token_kind_.html b/zh-cn/api/modules/parser_token_kind_.html index 3003fc193..e45214588 100644 --- a/zh-cn/api/modules/parser_token_kind_.html +++ b/zh-cn/api/modules/parser_token_kind_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_tokenizer_.html b/zh-cn/api/modules/parser_tokenizer_.html index ee7468e37..bc83eeb05 100644 --- a/zh-cn/api/modules/parser_tokenizer_.html +++ b/zh-cn/api/modules/parser_tokenizer_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/parser_whitespace_ctrl_.html b/zh-cn/api/modules/parser_whitespace_ctrl_.html index 8880b8a93..0b14f1576 100644 --- a/zh-cn/api/modules/parser_whitespace_ctrl_.html +++ b/zh-cn/api/modules/parser_whitespace_ctrl_.html @@ -156,7 +156,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_boolean_.html b/zh-cn/api/modules/render_boolean_.html index d53f961ee..fcc20b853 100644 --- a/zh-cn/api/modules/render_boolean_.html +++ b/zh-cn/api/modules/render_boolean_.html @@ -135,7 +135,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_expression_.html b/zh-cn/api/modules/render_expression_.html index 07c264fb8..4f90f59f2 100644 --- a/zh-cn/api/modules/render_expression_.html +++ b/zh-cn/api/modules/render_expression_.html @@ -269,7 +269,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_operator_.html b/zh-cn/api/modules/render_operator_.html index d211913a9..a6f2718fb 100644 --- a/zh-cn/api/modules/render_operator_.html +++ b/zh-cn/api/modules/render_operator_.html @@ -283,7 +283,7 @@
    - +
    diff --git a/zh-cn/api/modules/render_render_.html b/zh-cn/api/modules/render_render_.html index 925c157e1..501258030 100644 --- a/zh-cn/api/modules/render_render_.html +++ b/zh-cn/api/modules/render_render_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_.html b/zh-cn/api/modules/template_filter_filter_.html index c34efcd34..56a84df51 100644 --- a/zh-cn/api/modules/template_filter_filter_.html +++ b/zh-cn/api/modules/template_filter_filter_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_impl_.html b/zh-cn/api/modules/template_filter_filter_impl_.html index b591917e9..3ece2eca7 100644 --- a/zh-cn/api/modules/template_filter_filter_impl_.html +++ b/zh-cn/api/modules/template_filter_filter_impl_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_impl_options_.html b/zh-cn/api/modules/template_filter_filter_impl_options_.html index 5f6957c3a..14bc424a7 100644 --- a/zh-cn/api/modules/template_filter_filter_impl_options_.html +++ b/zh-cn/api/modules/template_filter_filter_impl_options_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_filter_filter_map_.html b/zh-cn/api/modules/template_filter_filter_map_.html index 405bfaaf1..f1b6c6e11 100644 --- a/zh-cn/api/modules/template_filter_filter_map_.html +++ b/zh-cn/api/modules/template_filter_filter_map_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_html_.html b/zh-cn/api/modules/template_html_.html index d48a56267..fd0c5df80 100644 --- a/zh-cn/api/modules/template_html_.html +++ b/zh-cn/api/modules/template_html_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_output_.html b/zh-cn/api/modules/template_output_.html index 510403093..bad931464 100644 --- a/zh-cn/api/modules/template_output_.html +++ b/zh-cn/api/modules/template_output_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_tag_hash_.html b/zh-cn/api/modules/template_tag_hash_.html index 9de022078..4a05abafe 100644 --- a/zh-cn/api/modules/template_tag_hash_.html +++ b/zh-cn/api/modules/template_tag_hash_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_.html b/zh-cn/api/modules/template_tag_tag_.html index 21e354411..8752f66f2 100644 --- a/zh-cn/api/modules/template_tag_tag_.html +++ b/zh-cn/api/modules/template_tag_tag_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_impl_.html b/zh-cn/api/modules/template_tag_tag_impl_.html index 49430a28c..e55455b89 100644 --- a/zh-cn/api/modules/template_tag_tag_impl_.html +++ b/zh-cn/api/modules/template_tag_tag_impl_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_impl_options_.html b/zh-cn/api/modules/template_tag_tag_impl_options_.html index 478a500c6..f665f7755 100644 --- a/zh-cn/api/modules/template_tag_tag_impl_options_.html +++ b/zh-cn/api/modules/template_tag_tag_impl_options_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_tag_tag_map_.html b/zh-cn/api/modules/template_tag_tag_map_.html index 505db24c4..dcccac6db 100644 --- a/zh-cn/api/modules/template_tag_tag_map_.html +++ b/zh-cn/api/modules/template_tag_tag_map_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_template_.html b/zh-cn/api/modules/template_template_.html index caa8e6bea..8c108b69e 100644 --- a/zh-cn/api/modules/template_template_.html +++ b/zh-cn/api/modules/template_template_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_template_impl_.html b/zh-cn/api/modules/template_template_impl_.html index fee42f7ea..c35393eea 100644 --- a/zh-cn/api/modules/template_template_impl_.html +++ b/zh-cn/api/modules/template_template_impl_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/template_value_.html b/zh-cn/api/modules/template_value_.html index f16b8f686..2201253fa 100644 --- a/zh-cn/api/modules/template_value_.html +++ b/zh-cn/api/modules/template_value_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_delimited_token_.html b/zh-cn/api/modules/tokens_delimited_token_.html index 9eac98ded..31c69e3e4 100644 --- a/zh-cn/api/modules/tokens_delimited_token_.html +++ b/zh-cn/api/modules/tokens_delimited_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_filter_token_.html b/zh-cn/api/modules/tokens_filter_token_.html index 223c73d6a..0347ee112 100644 --- a/zh-cn/api/modules/tokens_filter_token_.html +++ b/zh-cn/api/modules/tokens_filter_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_hash_token_.html b/zh-cn/api/modules/tokens_hash_token_.html index 4dc46568e..b9d7515e5 100644 --- a/zh-cn/api/modules/tokens_hash_token_.html +++ b/zh-cn/api/modules/tokens_hash_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_html_token_.html b/zh-cn/api/modules/tokens_html_token_.html index 69590f8ee..efed395cd 100644 --- a/zh-cn/api/modules/tokens_html_token_.html +++ b/zh-cn/api/modules/tokens_html_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_identifier_token_.html b/zh-cn/api/modules/tokens_identifier_token_.html index 030bbb242..bed74ebe6 100644 --- a/zh-cn/api/modules/tokens_identifier_token_.html +++ b/zh-cn/api/modules/tokens_identifier_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_liquid_tag_token_.html b/zh-cn/api/modules/tokens_liquid_tag_token_.html index 1fdaa85e1..147d258df 100644 --- a/zh-cn/api/modules/tokens_liquid_tag_token_.html +++ b/zh-cn/api/modules/tokens_liquid_tag_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_literal_token_.html b/zh-cn/api/modules/tokens_literal_token_.html index f29e84667..ede685bc7 100644 --- a/zh-cn/api/modules/tokens_literal_token_.html +++ b/zh-cn/api/modules/tokens_literal_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_number_token_.html b/zh-cn/api/modules/tokens_number_token_.html index 7bbcfd284..ead9e37c1 100644 --- a/zh-cn/api/modules/tokens_number_token_.html +++ b/zh-cn/api/modules/tokens_number_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_operator_token_.html b/zh-cn/api/modules/tokens_operator_token_.html index 29623f15a..3046acf2d 100644 --- a/zh-cn/api/modules/tokens_operator_token_.html +++ b/zh-cn/api/modules/tokens_operator_token_.html @@ -113,7 +113,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_output_token_.html b/zh-cn/api/modules/tokens_output_token_.html index 589d0b6c3..8e68ce9d6 100644 --- a/zh-cn/api/modules/tokens_output_token_.html +++ b/zh-cn/api/modules/tokens_output_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_property_access_token_.html b/zh-cn/api/modules/tokens_property_access_token_.html index 12074cb37..7563392af 100644 --- a/zh-cn/api/modules/tokens_property_access_token_.html +++ b/zh-cn/api/modules/tokens_property_access_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_quoted_token_.html b/zh-cn/api/modules/tokens_quoted_token_.html index 500d6f460..ece290be3 100644 --- a/zh-cn/api/modules/tokens_quoted_token_.html +++ b/zh-cn/api/modules/tokens_quoted_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_range_token_.html b/zh-cn/api/modules/tokens_range_token_.html index 13497a887..942ec4a96 100644 --- a/zh-cn/api/modules/tokens_range_token_.html +++ b/zh-cn/api/modules/tokens_range_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_tag_token_.html b/zh-cn/api/modules/tokens_tag_token_.html index 9eabdb645..30feb642a 100644 --- a/zh-cn/api/modules/tokens_tag_token_.html +++ b/zh-cn/api/modules/tokens_tag_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_token_.html b/zh-cn/api/modules/tokens_token_.html index 580aa9502..7df296439 100644 --- a/zh-cn/api/modules/tokens_token_.html +++ b/zh-cn/api/modules/tokens_token_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_toplevel_token_.html b/zh-cn/api/modules/tokens_toplevel_token_.html index 40fcf30df..32eb366ad 100644 --- a/zh-cn/api/modules/tokens_toplevel_token_.html +++ b/zh-cn/api/modules/tokens_toplevel_token_.html @@ -96,7 +96,7 @@
    - +
    diff --git a/zh-cn/api/modules/tokens_value_token_.html b/zh-cn/api/modules/tokens_value_token_.html index f41e0eb27..f8033545d 100644 --- a/zh-cn/api/modules/tokens_value_token_.html +++ b/zh-cn/api/modules/tokens_value_token_.html @@ -96,7 +96,7 @@
    - +
    diff --git a/zh-cn/api/modules/types_.html b/zh-cn/api/modules/types_.html index ca9106b4d..7d172f587 100644 --- a/zh-cn/api/modules/types_.html +++ b/zh-cn/api/modules/types_.html @@ -155,7 +155,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_assert_.html b/zh-cn/api/modules/util_assert_.html index 8e39889f2..e735cd22a 100644 --- a/zh-cn/api/modules/util_assert_.html +++ b/zh-cn/api/modules/util_assert_.html @@ -116,7 +116,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_async_.html b/zh-cn/api/modules/util_async_.html index a33f9db7e..57b615e4f 100644 --- a/zh-cn/api/modules/util_async_.html +++ b/zh-cn/api/modules/util_async_.html @@ -240,7 +240,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_character_.html b/zh-cn/api/modules/util_character_.html index c0876c079..49b5354ce 100644 --- a/zh-cn/api/modules/util_character_.html +++ b/zh-cn/api/modules/util_character_.html @@ -117,7 +117,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_collection_.html b/zh-cn/api/modules/util_collection_.html index 67e404988..a80e8f3d8 100644 --- a/zh-cn/api/modules/util_collection_.html +++ b/zh-cn/api/modules/util_collection_.html @@ -127,7 +127,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_error_.html b/zh-cn/api/modules/util_error_.html index 9a273e4d7..0b57d98db 100644 --- a/zh-cn/api/modules/util_error_.html +++ b/zh-cn/api/modules/util_error_.html @@ -131,7 +131,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_liquid_date_.html b/zh-cn/api/modules/util_liquid_date_.html index a0238c677..540a791d0 100644 --- a/zh-cn/api/modules/util_liquid_date_.html +++ b/zh-cn/api/modules/util_liquid_date_.html @@ -94,7 +94,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_literal_.html b/zh-cn/api/modules/util_literal_.html index 4faea6ade..9441b6447 100644 --- a/zh-cn/api/modules/util_literal_.html +++ b/zh-cn/api/modules/util_literal_.html @@ -109,7 +109,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_operator_trie_.html b/zh-cn/api/modules/util_operator_trie_.html index 3cbfe5db5..bf88f6ab2 100644 --- a/zh-cn/api/modules/util_operator_trie_.html +++ b/zh-cn/api/modules/util_operator_trie_.html @@ -110,7 +110,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_strftime_.html b/zh-cn/api/modules/util_strftime_.html index 9a449d987..ee8764f47 100644 --- a/zh-cn/api/modules/util_strftime_.html +++ b/zh-cn/api/modules/util_strftime_.html @@ -846,7 +846,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_timezone_date_.html b/zh-cn/api/modules/util_timezone_date_.html index 631300827..1ca34d0c3 100644 --- a/zh-cn/api/modules/util_timezone_date_.html +++ b/zh-cn/api/modules/util_timezone_date_.html @@ -102,7 +102,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_type_guards_.html b/zh-cn/api/modules/util_type_guards_.html index 10eb77b6b..303f496c3 100644 --- a/zh-cn/api/modules/util_type_guards_.html +++ b/zh-cn/api/modules/util_type_guards_.html @@ -297,7 +297,7 @@
    - +
    diff --git a/zh-cn/api/modules/util_underscore_.html b/zh-cn/api/modules/util_underscore_.html index a3aefec8c..0804aac26 100644 --- a/zh-cn/api/modules/util_underscore_.html +++ b/zh-cn/api/modules/util_underscore_.html @@ -641,7 +641,7 @@
    - +
    diff --git a/zh-cn/filters/abs.html b/zh-cn/filters/abs.html index 9892a30ed..df77c371a 100644 --- a/zh-cn/filters/abs.html +++ b/zh-cn/filters/abs.html @@ -95,27 +95,27 @@

    返回数字的绝对值。

    输入

    -
    {{ -17 | abs }}
    +
    {{ -17 | abs }}

    输出

    -
    17
    +
    17

    输入

    -
    {{ 4 | abs }}
    +
    {{ 4 | abs }}

    输出

    -
    4
    +
    4

    对于只包含数字的字符串也好使:

    输入

    -
    {{ "-19.86" | abs }}
    +
    {{ "-19.86" | abs }}

    输出

    -
    19.86
    +
    19.86
    diff --git a/zh-cn/filters/append.html b/zh-cn/filters/append.html index 13708e60e..658c1d198 100644 --- a/zh-cn/filters/append.html +++ b/zh-cn/filters/append.html @@ -95,21 +95,23 @@

    连接两个字符串并返回结果。

    输入

    -
    {{ "/my/fancy/url" | append: ".html" }}
    +
    {{ "/my/fancy/url" | append: ".html" }}

    输出

    -
    /my/fancy/url.html
    +
    /my/fancy/url.html

    也可以用于变量。

    输入

    -
    {% assign filename = "/index.html" %}
    {{ "website.com" | append: filename }}
    +
    {% assign filename = "/index.html" %}
    +{{ "website.com" | append: filename }}

    输出

    -

    website.com/index.html
    +
    
    +website.com/index.html
    diff --git a/zh-cn/filters/at_least.html b/zh-cn/filters/at_least.html index b9770c42b..a40c33a61 100644 --- a/zh-cn/filters/at_least.html +++ b/zh-cn/filters/at_least.html @@ -95,20 +95,20 @@

    限制数字到某个最小值。

    输入

    -
    {{ 4 | at_least: 5 }}
    +
    {{ 4 | at_least: 5 }}

    输出

    -
    5
    +
    5

    输入

    -
    {{ 4 | at_least: 3 }}
    +
    {{ 4 | at_least: 3 }}

    输出

    -
    4
    +
    4
    diff --git a/zh-cn/filters/at_most.html b/zh-cn/filters/at_most.html index 942996068..0bab1c552 100644 --- a/zh-cn/filters/at_most.html +++ b/zh-cn/filters/at_most.html @@ -95,20 +95,20 @@

    限制数字到某个最大值。

    输入

    -
    {{ 4 | at_most: 5 }}
    +
    {{ 4 | at_most: 5 }}

    输出

    -
    4
    +
    4

    输入

    -
    {{ 4 | at_most: 3 }}
    +
    {{ 4 | at_most: 3 }}

    输出

    -
    3
    +
    3
    diff --git a/zh-cn/filters/capitalize.html b/zh-cn/filters/capitalize.html index 5e30a4a5d..7a2de2a6b 100644 --- a/zh-cn/filters/capitalize.html +++ b/zh-cn/filters/capitalize.html @@ -95,21 +95,21 @@

    把字符串首字母改为大写。

    输入

    -
    {{ "title" | capitalize }}
    +
    {{ "title" | capitalize }}

    输出

    -
    Title
    +
    Title

    capitalize 只会大写首字母,因此后续单词的不会受影响:

    Input

    -
    {{ "my great title" | capitalize }}
    +
    {{ "my great title" | capitalize }}

    输出

    -
    My great title
    +
    My great title
    diff --git a/zh-cn/filters/ceil.html b/zh-cn/filters/ceil.html index 998b4ba14..acf3a263a 100644 --- a/zh-cn/filters/ceil.html +++ b/zh-cn/filters/ceil.html @@ -95,33 +95,33 @@

    向上取整,取整前 LiquidJS 会首先把输入转换为数字。

    输入

    -
    {{ 1.2 | ceil }}
    +
    {{ 1.2 | ceil }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 2.0 | ceil }}
    +
    {{ 2.0 | ceil }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 183.357 | ceil }}
    +
    {{ 183.357 | ceil }}

    输出

    -
    184
    +
    184

    下面的例子中输入是字符串:

    输入

    -
    {{ "3.5" | ceil }}
    +
    {{ "3.5" | ceil }}

    输出

    -
    4
    +
    4
    diff --git a/zh-cn/filters/compact.html b/zh-cn/filters/compact.html index 01a41bcaf..763ef82c5 100644 --- a/zh-cn/filters/compact.html +++ b/zh-cn/filters/compact.html @@ -96,21 +96,39 @@

    从数组里移除任何 nullundefined 值。

    假设 site.pages 是网页列表,有些网页包含 category 属性用来标明类别。如果把它们 map 到数组里,那么对于没有 category 属性的元素就会是 undefined

    输入

    -
    {% assign site_categories = site.pages | map: "category" %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}
    +
    {% assign site_categories = site.pages | map: "category" %}
    +
    +{% for category in site_categories %}
    +- {{ category }}
    +{% endfor %}

    输出

    -
    - business
    - celebrities
    -
    - lifestyle
    - sports
    -
    - technology
    +
    - business
    +- celebrities
    +-
    +- lifestyle
    +- sports
    +-
    +- technology

    使用 compact 创建 site_categories 数组,可以移除所有 nullundefined 值。

    输入

    -
    {% assign site_categories = site.pages | map: "category" | compact %}

    {% for category in site_categories %}
    - {{ category }}
    {% endfor %}
    +
    {% assign site_categories = site.pages | map: "category" | compact %}
    +
    +{% for category in site_categories %}
    +- {{ category }}
    +{% endfor %}

    输出

    -
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    +
    - business
    +- celebrities
    +- lifestyle
    +- sports
    +- technology
    diff --git a/zh-cn/filters/concat.html b/zh-cn/filters/concat.html index 2d508c4c9..6722e335d 100644 --- a/zh-cn/filters/concat.html +++ b/zh-cn/filters/concat.html @@ -95,21 +95,47 @@

    连接多个数组,返回的数组包含所有传入数组的元素。

    输入

    -
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    {% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}

    {% assign everything = fruits | concat: vegetables %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    +
    {% assign fruits = "apples, oranges, peaches" | split: ", " %}
    +{% assign vegetables = "carrots, turnips, potatoes" | split: ", " %}
    +
    +{% assign everything = fruits | concat: vegetables %}
    +
    +{% for item in everything %}
    +- {{ item }}
    +{% endfor %}

    输出

    -
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    +
    - apples
    +- oranges
    +- peaches
    +- carrots
    +- turnips
    +- potatoes

    可以链式地使用 concat 过滤器来连接多个数组:

    输入

    -
    {% assign furniture = "chairs, tables, shelves" | split: ", " %}

    {% assign everything = fruits | concat: vegetables | concat: furniture %}

    {% for item in everything %}
    - {{ item }}
    {% endfor %}
    +
    {% assign furniture = "chairs, tables, shelves" | split: ", " %}
    +
    +{% assign everything = fruits | concat: vegetables | concat: furniture %}
    +
    +{% for item in everything %}
    +- {{ item }}
    +{% endfor %}

    输出

    -
    - apples
    - oranges
    - peaches
    - carrots
    - turnips
    - potatoes
    - chairs
    - tables
    - shelves
    +
    - apples
    +- oranges
    +- peaches
    +- carrots
    +- turnips
    +- potatoes
    +- chairs
    +- tables
    +- shelves
    diff --git a/zh-cn/filters/date.html b/zh-cn/filters/date.html index 300b733d1..57b94cb96 100644 --- a/zh-cn/filters/date.html +++ b/zh-cn/filters/date.html @@ -95,36 +95,36 @@

    把时间戳转换为字符串。LiquidJS 尝试跟 Shopify/Liquid 保持一致,它用的是 Ruby 核心的 Time#strftime(string)。此外 LiquidJS 会先通过 new Date() 尝试把输入转换为 Date 对象。

    输入

    -
    {{ article.published_at | date: "%a, %b %d, %y" }}
    +
    {{ article.published_at | date: "%a, %b %d, %y" }}

    输出

    -
    Fri, Jul 17, 15
    +
    Fri, Jul 17, 15
    时区

    日期在输出时会转换为当地时区,设置 timezoneOffset LiquidJS 参数可以指定一个不同的时区。或者设置 preserveTimezonestrue 来保持字面量时间戳的时区,数据中的日期对象不受此参数的影响。

    输入

    -
    {{ article.published_at | date: "%Y" }}
    +
    {{ article.published_at | date: "%Y" }}

    输出

    -
    2015
    +
    2015

    对于包含格式正确的字符串也好使:

    输入

    -
    {{ "March 14, 2016" | date: "%b %d, %y" }}
    +
    {{ "March 14, 2016" | date: "%b %d, %y" }}

    输出

    -
    Mar 14, 16
    +
    Mar 14, 16
    时间戳字符串

    LiquidJS 使用 JavaScript [Date][newDate] 来解析输入字符串,意味着支持 IETF-compliant RFC 2822 时间戳特定版本的 ISO8601

    可以用特殊值 "now"(或"today")来获取当前时间:

    输入

    -
    This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.
    +
    This page was last updated at {{ "now" | date: "%Y-%m-%d %H:%M" }}.

    输出

    -
    This page was last updated at 2020-03-25 15:57.
    +
    This page was last updated at 2020-03-25 15:57.
    当前时间

    注意得到的当前时间是模板渲染时的时间,如果你在用静态站点生成器或者模板有被缓存这一时间可能与用户看到的时间不同。

    @@ -132,7 +132,7 @@ diff --git a/zh-cn/filters/default.html b/zh-cn/filters/default.html index 1793de639..f59b1ab13 100644 --- a/zh-cn/filters/default.html +++ b/zh-cn/filters/default.html @@ -95,38 +95,41 @@

    在值不存在时给一个默认值,如果左侧是 falsy 或空(stringArray)就会使用这个默认值。下面的例子中 product_price 没有定义,因此使用了默认值。

    输入

    -
    {{ product_price | default: 2.99 }}
    +
    {{ product_price | default: 2.99 }}

    输出

    -
    2.99
    +
    2.99

    下面的例子中定义了 product_price 所以没有使用默认值。

    输入

    -
    {% assign product_price = 4.99 %}
    {{ product_price | default: 2.99 }}
    +
    {% assign product_price = 4.99 %}
    +{{ product_price | default: 2.99 }}

    输出

    -
    4.99
    +
    4.99

    下面例子中 product_price 为空,所以使用了默认值。

    输入

    -
    {% assign product_price = "" %}
    {{ product_price | default: 2.99 }}
    +
    {% assign product_price = "" %}
    +{{ product_price | default: 2.99 }}

    输出

    -
    2.99
    +
    2.99

    允许 false

    v9.32.0

    为了允许让 false 直接输出而不是用默认值,可以用 allow_false 参数。

    输入

    -
    {% assign display_price = false %}
    {{ display_price | default: true, allow_false: true }}
    +
    {% assign display_price = false %}
    +{{ display_price | default: true, allow_false: true }}

    输出

    -
    false
    +
    false
    diff --git a/zh-cn/filters/divided_by.html b/zh-cn/filters/divided_by.html index f47be7084..23642ffb4 100644 --- a/zh-cn/filters/divided_by.html +++ b/zh-cn/filters/divided_by.html @@ -95,16 +95,16 @@

    两数相除返回商,返回结果数字在 JavaScript 中 .toString() 得到的字符串。

    输入

    -
    {{ 16 | divided_by: 4 }}
    +
    {{ 16 | divided_by: 4 }}

    输出

    -
    4
    +
    4

    输入

    -
    {{ 5 | divided_by: 3 }}
    +
    {{ 5 | divided_by: 3 }}

    输出

    -
    1.6666666666666667
    +
    1.6666666666666667
    Integer Arithmetic

    Since JavaScript doesn’t differentiate integers and floats, LiquidJS is not capable of integer arithmetic and the return type is always number, the string representation of which depends on its value.

    @@ -112,7 +112,7 @@ diff --git a/zh-cn/filters/downcase.html b/zh-cn/filters/downcase.html index 6dafbb39e..0015d1181 100644 --- a/zh-cn/filters/downcase.html +++ b/zh-cn/filters/downcase.html @@ -95,20 +95,20 @@

    字符串中每个字符都转为小写,对已经是小写的字符没有影响。

    输入

    -
    {{ "Parker Moore" | downcase }}
    +
    {{ "Parker Moore" | downcase }}

    输出

    -
    parker moore
    +
    parker moore

    输入

    -
    {{ "apple" | downcase }}
    +
    {{ "apple" | downcase }}

    输出

    -
    apple
    +
    apple
    diff --git a/zh-cn/filters/escape.html b/zh-cn/filters/escape.html index 02ce5b27e..5897fb492 100644 --- a/zh-cn/filters/escape.html +++ b/zh-cn/filters/escape.html @@ -95,7 +95,7 @@

    把字符串中的 HTML 特殊字符转义,对不需要转义的字符串不会产生影响。

    输入

    -
    {{ "Have you read 'James & the Giant Peach'?" | escape }}
    +
    {{ "Have you read 'James & the Giant Peach'?" | escape }}

    输出

    @@ -103,14 +103,14 @@ Have you read &#39;James &amp; the Giant Peach&#39;?
     

    输入

    -
    {{ "Tetsuro Takara" | escape }}
    +
    {{ "Tetsuro Takara" | escape }}

    输出

    -
    Tetsuro Takara
    +
    Tetsuro Takara
    diff --git a/zh-cn/filters/escape_once.html b/zh-cn/filters/escape_once.html index a5e9a2c76..338e69d38 100644 --- a/zh-cn/filters/escape_once.html +++ b/zh-cn/filters/escape_once.html @@ -95,7 +95,7 @@

    把字符串中的特殊字符转义得到可用在 URL 里的字符串,对已经转义过的字符串和不需要转义的字符串不会产生影响。

    输入

    -
    {{ "1 < 2 & 3" | escape_once }}
    +
    {{ "1 < 2 & 3" | escape_once }}

    输出

    @@ -114,7 +114,7 @@
     
                   
                   
                 
    diff --git a/zh-cn/filters/first.html b/zh-cn/filters/first.html
    index 931f134a8..cc0b53c47 100644
    --- a/zh-cn/filters/first.html
    +++ b/zh-cn/filters/first.html
    @@ -95,23 +95,27 @@
     
     

    返回数组的第一个元素。

    输入

    -
    {{ "Ground control to Major Tom." | split: " " | first }}
    +
    {{ "Ground control to Major Tom." | split: " " | first }}

    输出

    -
    Ground
    +
    Ground

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.first }}
    +
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    +{{ my_array.first }}

    输出

    -

    zebra
    +
    
    +zebra

    需要在标签中使用的时候,可以用点来计算 first

    -
    {% if my_array.first == "zebra" %}
    Here comes a zebra!
    {% endif %}
    +
    {% if my_array.first == "zebra" %}
    +  Here comes a zebra!
    +{% endif %}
    diff --git a/zh-cn/filters/floor.html b/zh-cn/filters/floor.html index 3701feb14..9d5685f03 100644 --- a/zh-cn/filters/floor.html +++ b/zh-cn/filters/floor.html @@ -95,33 +95,33 @@

    数字下取整,LiquidJS 会尝试把输入转换为数字再做下取整操作。

    输入

    -
    {{ 1.2 | floor }}
    +
    {{ 1.2 | floor }}

    输出

    -
    1
    +
    1

    输入

    -
    {{ 2.0 | floor }}
    +
    {{ 2.0 | floor }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 183.357 | floor }}
    +
    {{ 183.357 | floor }}

    输出

    -
    183
    +
    183

    下面的例子中输入是个数字:

    输入

    -
    {{ "3.5" | floor }}
    +
    {{ "3.5" | floor }}

    输出

    -
    3
    +
    3
    diff --git a/zh-cn/filters/join.html b/zh-cn/filters/join.html index 4f3c50be5..13efa4139 100644 --- a/zh-cn/filters/join.html +++ b/zh-cn/filters/join.html @@ -95,14 +95,16 @@

    把数组中的元素连接成为一个字符串,以传入的参数作为分隔符。

    输入

    -
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    {{ beatles | join: " and " }}
    +
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    +{{ beatles | join: " and " }}

    输出

    -

    John and Paul and George and Ringo
    +
    
    +John and Paul and George and Ringo
    diff --git a/zh-cn/filters/json.html b/zh-cn/filters/json.html index ba7495918..79bb9fb47 100644 --- a/zh-cn/filters/json.html +++ b/zh-cn/filters/json.html @@ -95,14 +95,15 @@

    通过 JSON.stringify() 把值转换为字符串,多用于调试用途。

    输入

    -
    {% assign arr = "foo bar coo" | split: " " %}
    {{ arr | json }}
    +
    {% assign arr = "foo bar coo" | split: " " %}
    +{{ arr | json }}

    输出

    -
    ["foo","bar","coo"]
    +
    ["foo","bar","coo"]
    diff --git a/zh-cn/filters/last.html b/zh-cn/filters/last.html index 677773926..80c44c81f 100644 --- a/zh-cn/filters/last.html +++ b/zh-cn/filters/last.html @@ -95,23 +95,27 @@

    返回数组的最后一个元素。

    输入

    -
    {{ "Ground control to Major Tom." | split: " " | last }}
    +
    {{ "Ground control to Major Tom." | split: " " | last }}

    输出

    -
    Tom.
    +
    Tom.

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    {{ my_array.last }}
    +
    {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
    +{{ my_array.last }}

    输出

    -

    tiger
    +
    
    +tiger

    需要在标签中使用的时候,可以用点来计算 last

    -
    {% if my_array.last == "tiger" %}
    There goes a tiger!
    {% endif %}
    +
    {% if my_array.last == "tiger" %}
    +  There goes a tiger!
    +{% endif %}
    diff --git a/zh-cn/filters/lstrip.html b/zh-cn/filters/lstrip.html index 80bf3d6be..500f0f5c2 100644 --- a/zh-cn/filters/lstrip.html +++ b/zh-cn/filters/lstrip.html @@ -95,14 +95,14 @@

    移除字符串左侧的空白字符(制表符、空格、换行),不影响词之间的空格。

    输入

    -
    BEGIN{{ "          So much room for activities!          " | lstrip }}END
    +
    BEGIN{{ "          So much room for activities!          " | lstrip }}END

    输出

    -
    BEGINSo much room for activities!          END
    +
    BEGINSo much room for activities!          END
    diff --git a/zh-cn/filters/map.html b/zh-cn/filters/map.html index d48446d4c..7a29a19fb 100644 --- a/zh-cn/filters/map.html +++ b/zh-cn/filters/map.html @@ -96,14 +96,22 @@

    按照属性名提取对象的属性形成另一个数组并返回。

    下面的例子中假设 site.pages 包含了站点的所有网页元信息。使用 assignmap 过滤器创建了一个 site.pages 中所有对象的 category 属性的值构成的数组。

    输入

    -
    {% assign all_categories = site.pages | map: "category" %}

    {% for item in all_categories %}
    - {{ item }}
    {% endfor %}
    +
    {% assign all_categories = site.pages | map: "category" %}
    +
    +{% for item in all_categories %}
    +- {{ item }}
    +{% endfor %}

    输出

    -
    - business
    - celebrities
    - lifestyle
    - sports
    - technology
    +
    - business
    +- celebrities
    +- lifestyle
    +- sports
    +- technology
    diff --git a/zh-cn/filters/minus.html b/zh-cn/filters/minus.html index ebaf53f2f..68e469a94 100644 --- a/zh-cn/filters/minus.html +++ b/zh-cn/filters/minus.html @@ -95,26 +95,26 @@

    两数相减。

    输入

    -
    {{ 4 | minus: 2 }}
    +
    {{ 4 | minus: 2 }}

    输出

    -
    2
    +
    2

    输入

    -
    {{ 16 | minus: 4 }}
    +
    {{ 16 | minus: 4 }}

    输出

    -
    12
    +
    12

    输入

    -
    {{ 183.357 | minus: 12 }}
    +
    {{ 183.357 | minus: 12 }}

    输出

    -
    171.357
    +
    171.357
    diff --git a/zh-cn/filters/modulo.html b/zh-cn/filters/modulo.html index 288d6aedd..55a989654 100644 --- a/zh-cn/filters/modulo.html +++ b/zh-cn/filters/modulo.html @@ -95,26 +95,26 @@

    返回两数相除的余数。

    输入

    -
    {{ 3 | modulo: 2 }}
    +
    {{ 3 | modulo: 2 }}

    输出

    -
    1
    +
    1

    输入

    -
    {{ 24 | modulo: 7 }}
    +
    {{ 24 | modulo: 7 }}

    输出

    -
    3
    +
    3

    输入

    -
    {{ 183.357 | modulo: 12 }}
    +
    {{ 183.357 | modulo: 12 }}

    输出

    -
    3.3569999999999993
    +
    3.3569999999999993
    diff --git a/zh-cn/filters/newline_to_br.html b/zh-cn/filters/newline_to_br.html index a280b23ac..52031cd57 100644 --- a/zh-cn/filters/newline_to_br.html +++ b/zh-cn/filters/newline_to_br.html @@ -95,14 +95,20 @@

    把字符串里的所有换行符(\n)替换为 HTML 换行(<br />)。

    输入

    -
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | newline_to_br }}
    +
    {% capture string_with_newlines %}
    +Hello
    +there
    +{% endcapture %}
    +
    +{{ string_with_newlines | newline_to_br }}

    输出

    -

    <br/>Hello<br/>there<br/>
    +
    
    +<br/>Hello<br/>there<br/>
    diff --git a/zh-cn/filters/overview.html b/zh-cn/filters/overview.html index be660ff19..599217d95 100644 --- a/zh-cn/filters/overview.html +++ b/zh-cn/filters/overview.html @@ -124,7 +124,7 @@
    - +
    diff --git a/zh-cn/filters/plus.html b/zh-cn/filters/plus.html index b26bd1fa5..3f9bdf427 100644 --- a/zh-cn/filters/plus.html +++ b/zh-cn/filters/plus.html @@ -95,26 +95,26 @@

    两数相加。

    输入

    -
    {{ 4 | plus: 2 }}
    +
    {{ 4 | plus: 2 }}

    输出

    -
    6
    +
    6

    输入

    -
    {{ 16 | plus: 4 }}
    +
    {{ 16 | plus: 4 }}

    输出

    -
    20
    +
    20

    输入

    -
    {{ 183.357 | plus: 12 }}
    +
    {{ 183.357 | plus: 12 }}

    输出

    -
    195.357
    +
    195.357
    diff --git a/zh-cn/filters/prepend.html b/zh-cn/filters/prepend.html index 6d61dfd5d..3a1fcd926 100644 --- a/zh-cn/filters/prepend.html +++ b/zh-cn/filters/prepend.html @@ -95,21 +95,23 @@

    在字符串开头添加另一个字符串。

    输入

    -
    {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}
    +
    {{ "apples, oranges, and bananas" | prepend: "Some fruit: " }}

    输出

    -
    Some fruit: apples, oranges, and bananas
    +
    Some fruit: apples, oranges, and bananas

    prepend 也可以用于变量。

    输入

    -
    {% assign url = "example.com" %}
    {{ "/index.html" | prepend: url }}
    +
    {% assign url = "example.com" %}
    +{{ "/index.html" | prepend: url }}

    输出

    -

    example.com/index.html
    +
    
    +example.com/index.html
    diff --git a/zh-cn/filters/remove.html b/zh-cn/filters/remove.html index 92d77e36b..53a46f098 100644 --- a/zh-cn/filters/remove.html +++ b/zh-cn/filters/remove.html @@ -95,14 +95,14 @@

    移除字符串中出现的所有指定子字符串。

    输入

    -
    {{ "I strained to see the train through the rain" | remove: "rain" }}
    +
    {{ "I strained to see the train through the rain" | remove: "rain" }}

    输出

    -
    I strained to see the t through the 
    +
    I strained to see the t through the 
    diff --git a/zh-cn/filters/remove_first.html b/zh-cn/filters/remove_first.html index 8e48b3855..9e4aeee4b 100644 --- a/zh-cn/filters/remove_first.html +++ b/zh-cn/filters/remove_first.html @@ -95,14 +95,14 @@

    移除字符串中出现的第一个指定子字符串。

    输入

    -
    {{ "I strained to see the train through the rain" | remove_first: "rain" }}
    +
    {{ "I strained to see the train through the rain" | remove_first: "rain" }}

    输出

    -
    I strained to see the t through the rain
    +
    I strained to see the t through the rain
    diff --git a/zh-cn/filters/replace.html b/zh-cn/filters/replace.html index ec7a39323..592bc2a3a 100644 --- a/zh-cn/filters/replace.html +++ b/zh-cn/filters/replace.html @@ -95,14 +95,14 @@

    把字符串中出现的每一个指定子字符串替换为另一个字符串。

    输入

    -
    {{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}
    +
    {{ "Take my protein pills and put my helmet on" | replace: "my", "your" }}

    输出

    -
    Take your protein pills and put your helmet on
    +
    Take your protein pills and put your helmet on
    diff --git a/zh-cn/filters/replace_first.html b/zh-cn/filters/replace_first.html index 761289bd6..fcfc68e68 100644 --- a/zh-cn/filters/replace_first.html +++ b/zh-cn/filters/replace_first.html @@ -95,14 +95,14 @@

    把字符串中出现的第一个指定子字符串替换为另一个字符串。

    输入

    -
    {{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}
    +
    {{ "Take my protein pills and put my helmet on" | replace_first: "my", "your" }}

    输出

    -
    Take your protein pills and put my helmet on
    +
    Take your protein pills and put my helmet on
    diff --git a/zh-cn/filters/reverse.html b/zh-cn/filters/reverse.html index f703dd250..dcbc8ef21 100644 --- a/zh-cn/filters/reverse.html +++ b/zh-cn/filters/reverse.html @@ -95,21 +95,25 @@

    反转数组的所有元素,不可用于字符串。

    输入

    -
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array | reverse | join: ", " }}
    +
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
    +
    +{{ my_array | reverse | join: ", " }}

    输出

    -


    plums, peaches, oranges, apples
    +
    
    +
    +plums, peaches, oranges, apples

    尽管 reverse 不能直接用于字符串,可以把字符串分割成数组,反转后再连接成字符串:

    输入

    -
    {{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}
    +
    {{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}

    输出

    -
    .moT rojaM ot lortnoc dnuorG
    +
    .moT rojaM ot lortnoc dnuorG
    diff --git a/zh-cn/filters/round.html b/zh-cn/filters/round.html index f812a86e1..a1699bfa2 100644 --- a/zh-cn/filters/round.html +++ b/zh-cn/filters/round.html @@ -95,26 +95,26 @@

    数字四舍五入取整,如果传入小数位数作为参数。

    输入

    -
    {{ 1.2 | round }}
    +
    {{ 1.2 | round }}

    输出

    -
    1
    +
    1

    输入

    -
    {{ 2.7 | round }}
    +
    {{ 2.7 | round }}

    输出

    -
    3
    +
    3

    输入

    -
    {{ 183.357 | round: 2 }}
    +
    {{ 183.357 | round: 2 }}

    输出

    -
    183.36
    +
    183.36
    diff --git a/zh-cn/filters/rstrip.html b/zh-cn/filters/rstrip.html index 7766a9c0b..ff432c1ba 100644 --- a/zh-cn/filters/rstrip.html +++ b/zh-cn/filters/rstrip.html @@ -95,14 +95,14 @@

    移除字符串右侧的空白字符(制表符、空格、换行),不影响词之间的空格。

    输入

    -
    BEGIN{{ "          So much room for activities!          " | rstrip }}END
    +
    BEGIN{{ "          So much room for activities!          " | rstrip }}END

    输出

    -
    BEGIN          So much room for activities!END
    +
    BEGIN          So much room for activities!END
    diff --git a/zh-cn/filters/size.html b/zh-cn/filters/size.html index dbd32c280..3ab8117e0 100644 --- a/zh-cn/filters/size.html +++ b/zh-cn/filters/size.html @@ -95,23 +95,29 @@

    返回字符串的字符个数或者数组的元素个数。

    输入

    -
    {{ "Ground control to Major Tom." | size }}
    +
    {{ "Ground control to Major Tom." | size }}

    输出

    -
    28
    +
    28

    输入

    -
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}

    {{ my_array.size }}
    +
    {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
    +
    +{{ my_array.size }}

    输出

    -


    4
    +
    
    +
    +4

    在标签里可以用点来计算 size

    -
    {% if site.pages.size > 10 %}
    This is a big website!
    {% endif %}
    +
    {% if site.pages.size > 10 %}
    +  This is a big website!
    +{% endif %}
    diff --git a/zh-cn/filters/slice.html b/zh-cn/filters/slice.html index 4ceb543e6..ed967b0da 100644 --- a/zh-cn/filters/slice.html +++ b/zh-cn/filters/slice.html @@ -95,33 +95,33 @@

    返回第一个参数为下标位置的一个字符,如果指定了第二个参数会被解释为子字符串的长度。字符串下标从零开始。

    输入

    -
    {{ "Liquid" | slice: 0 }}
    +
    {{ "Liquid" | slice: 0 }}

    输出

    -
    L
    +
    L

    输入

    -
    {{ "Liquid" | slice: 2 }}
    +
    {{ "Liquid" | slice: 2 }}

    输出

    -
    q
    +
    q

    输入

    -
    {{ "Liquid" | slice: 2, 5 }}
    +
    {{ "Liquid" | slice: 2, 5 }}

    输出

    -
    quid
    +
    quid

    If the first argument is a negative number, the indices are counted from the end of the string:

    输入

    -
    {{ "Liquid" | slice: -3, 2 }}
    +
    {{ "Liquid" | slice: -3, 2 }}

    输出

    -
    ui
    +
    ui
    diff --git a/zh-cn/filters/sort.html b/zh-cn/filters/sort.html index 6f6088066..ca1eba146 100644 --- a/zh-cn/filters/sort.html +++ b/zh-cn/filters/sort.html @@ -95,17 +95,24 @@

    对数组中的元素排序,排序方式为 JavaScript Array.prototype.sort()

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort | join: ", " }}
    +
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}
    +
    +{{ my_array | sort | join: ", " }}

    输出

    -


    Sally Snake, giraffe, octopus, zebra
    +
    
    +
    +Sally Snake, giraffe, octopus, zebra

    有一个参数来指定用元素的哪个属性排序。

    -
    {% assign products_by_price = collection.products | sort: "price" %}
    {% for product in products_by_price %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    +
    {% assign products_by_price = collection.products | sort: "price" %}
    +{% for product in products_by_price %}
    +  <h4>{{ product.title }}</h4>
    +{% endfor %}
    diff --git a/zh-cn/filters/sort_natural.html b/zh-cn/filters/sort_natural.html index 3737e4094..9fa844287 100644 --- a/zh-cn/filters/sort_natural.html +++ b/zh-cn/filters/sort_natural.html @@ -95,17 +95,24 @@

    大小写不敏感地对数组元素排序。

    输入

    -
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}

    {{ my_array | sort_natural | join: ", " }}
    +
    {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %}
    +
    +{{ my_array | sort_natural | join: ", " }}

    输出

    -


    giraffe, octopus, Sally Snake, zebra
    +
    
    +
    +giraffe, octopus, Sally Snake, zebra

    有一个参数来指定用元素的哪个属性排序。

    -
    {% assign products_by_company = collection.products | sort_natural: "company" %}
    {% for product in products_by_company %}
    <h4>{{ product.title }}</h4>
    {% endfor %}
    +
    {% assign products_by_company = collection.products | sort_natural: "company" %}
    +{% for product in products_by_company %}
    +  <h4>{{ product.title }}</h4>
    +{% endfor %}
    diff --git a/zh-cn/filters/split.html b/zh-cn/filters/split.html index 5a249585e..de00551cf 100644 --- a/zh-cn/filters/split.html +++ b/zh-cn/filters/split.html @@ -95,14 +95,28 @@

    把字符串按照指定的分隔符进行分割,split 通常用于把逗号分隔的字符串转换为数组。

    输入

    -
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}

    {% for member in beatles %}
    {{ member }}
    {% endfor %}
    +
    {% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
    +
    +{% for member in beatles %}
    +  {{ member }}
    +{% endfor %}

    输出

    -




    John

    Paul

    George

    Ringo
    +
    
    +
    +
    +
    +John
    +
    +Paul
    +
    +George
    +
    +Ringo
    diff --git a/zh-cn/filters/strip.html b/zh-cn/filters/strip.html index d2a8b580f..3f6639743 100644 --- a/zh-cn/filters/strip.html +++ b/zh-cn/filters/strip.html @@ -95,14 +95,14 @@

    移除字符串两侧的空白字符(制表符、空格、换行),不影响词之间的空格。

    输入

    -
    BEGIN{{ "          So much room for activities!          " | strip }}END
    +
    BEGIN{{ "          So much room for activities!          " | strip }}END

    输出

    -
    BEGINSo much room for activities!END
    +
    BEGINSo much room for activities!END
    diff --git a/zh-cn/filters/strip_html.html b/zh-cn/filters/strip_html.html index a003294c5..945c23a18 100644 --- a/zh-cn/filters/strip_html.html +++ b/zh-cn/filters/strip_html.html @@ -95,14 +95,14 @@

    移除字符串中的 HTML 标签。

    输入

    -
    {{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}
    +
    {{ "Have <em>you</em> read <strong>Ulysses</strong>?" | strip_html }}

    输出

    -
    Have you read Ulysses?
    +
    Have you read Ulysses?
    diff --git a/zh-cn/filters/strip_newlines.html b/zh-cn/filters/strip_newlines.html index b828f2543..176492373 100644 --- a/zh-cn/filters/strip_newlines.html +++ b/zh-cn/filters/strip_newlines.html @@ -95,14 +95,20 @@

    移除字符串中的换行符。

    输入

    -
    {% capture string_with_newlines %}
    Hello
    there
    {% endcapture %}

    {{ string_with_newlines | strip_newlines }}
    +
    {% capture string_with_newlines %}
    +Hello
    +there
    +{% endcapture %}
    +
    +{{ string_with_newlines | strip_newlines }}

    输出

    -

    Hellothere
    +
    
    +Hellothere
    diff --git a/zh-cn/filters/times.html b/zh-cn/filters/times.html index 25ddb68b9..ae151f444 100644 --- a/zh-cn/filters/times.html +++ b/zh-cn/filters/times.html @@ -95,26 +95,26 @@

    两数相乘。

    输入

    -
    {{ 3 | times: 2 }}
    +
    {{ 3 | times: 2 }}

    输出

    -
    6
    +
    6

    输入

    -
    {{ 24 | times: 7 }}
    +
    {{ 24 | times: 7 }}

    输出

    -
    168
    +
    168

    输入

    -
    {{ 183.357 | times: 12 }}
    +
    {{ 183.357 | times: 12 }}

    输出

    -
    2200.284
    +
    2200.284
    diff --git a/zh-cn/filters/truncate.html b/zh-cn/filters/truncate.html index e9b0d293a..43b2754ae 100644 --- a/zh-cn/filters/truncate.html +++ b/zh-cn/filters/truncate.html @@ -95,28 +95,28 @@

    把字符串截断为指定长度,可以指定一个数字表示截断到多少长度。最后会添加一个省略号(…)且记在长度里。

    基本使用

    输入

    -
    {{ "Ground control to Major Tom." | truncate: 20 }}
    +
    {{ "Ground control to Major Tom." | truncate: 20 }}

    输出

    -
    Ground control to...
    +
    Ground control to...

    自定义省略号

    truncate 的第二个可选参数用来指定后面追加的字符串,默认为省略号(…)。这个参数的长度会计算在第一个参数的长度里。例如,如果要把字符串截断到 10 个字符,并使用了一个 3 字符长度的省略号,那么第一个参数的值要设置到 13

    输入

    -
    {{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}
    +
    {{ "Ground control to Major Tom." | truncate: 25, ", and so on" }}

    输出

    -
    Ground control, and so on
    +
    Ground control, and so on

    不要省略号

    如果需要把字符串截断到特定长度且不要添加省略号,则把第二个参数设置为空字符串:

    输入

    -
    {{ "Ground control to Major Tom." | truncate: 20, "" }}
    +
    {{ "Ground control to Major Tom." | truncate: 20, "" }}

    输出

    -
    Ground control to Ma
    +
    Ground control to Ma
    diff --git a/zh-cn/filters/truncatewords.html b/zh-cn/filters/truncatewords.html index 53e97ef56..891da6b45 100644 --- a/zh-cn/filters/truncatewords.html +++ b/zh-cn/filters/truncatewords.html @@ -95,28 +95,28 @@

    把字符串截断为指定个数的单词,可以指定一个数字表示截断到多少个单词。最后会添加一个省略号(…)。

    基本使用

    输入

    -
    {{ "Ground control to Major Tom." | truncatewords: 3 }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3 }}

    输出

    -
    Ground control to...
    +
    Ground control to...

    自定义省略号

    truncate 的第二个可选参数用来指定后面追加的字符串,默认为省略号(…)。

    输入

    -
    {{ "Ground control to Major Tom." | truncatewords: 3, "--" }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3, "--" }}

    输出

    -
    Ground control to--
    +
    Ground control to--

    不要省略号

    如果不希望添加省略号,把第二个参数设置为空字符串即可:

    输入

    -
    {{ "Ground control to Major Tom." | truncatewords: 3, "" }}
    +
    {{ "Ground control to Major Tom." | truncatewords: 3, "" }}

    输出

    -
    Ground control to
    +
    Ground control to
    diff --git a/zh-cn/filters/uniq.html b/zh-cn/filters/uniq.html index 1dbde6ffa..60c914d67 100644 --- a/zh-cn/filters/uniq.html +++ b/zh-cn/filters/uniq.html @@ -95,7 +95,8 @@

    移除数组中的重复元素。

    输入

    -
    {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
    {{ my_array | uniq | join: ", " }}
    +
    {% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
    +{{ my_array | uniq | join: ", " }}

    输出

    
    @@ -103,7 +104,7 @@ ants, bugs, bees```
    diff --git a/zh-cn/filters/upcase.html b/zh-cn/filters/upcase.html index 23e7321e9..5855b0e4e 100644 --- a/zh-cn/filters/upcase.html +++ b/zh-cn/filters/upcase.html @@ -95,20 +95,20 @@

    字符串中每个字符都转为大写,对已经是大写的字符没有影响。

    输入

    -
    {{ "Parker Moore" | upcase }}
    +
    {{ "Parker Moore" | upcase }}

    输出

    -
    PARKER MOORE
    +
    PARKER MOORE

    输入

    -
    {{ "APPLE" | upcase }}
    +
    {{ "APPLE" | upcase }}

    输出

    -
    APPLE
    +
    APPLE
    diff --git a/zh-cn/filters/url_decode.html b/zh-cn/filters/url_decode.html index 10a0a31e2..17570f9d9 100644 --- a/zh-cn/filters/url_decode.html +++ b/zh-cn/filters/url_decode.html @@ -95,14 +95,14 @@

    把 URL 编码的字符串解码。

    输入

    -
    {{ "%27Stop%21%27+said+Fred" | url_decode }}
    +
    {{ "%27Stop%21%27+said+Fred" | url_decode }}

    输出

    -
    'Stop!' said Fred
    +
    'Stop!' said Fred
    diff --git a/zh-cn/filters/url_encode.html b/zh-cn/filters/url_encode.html index af1c5be6f..2cccd4ef4 100644 --- a/zh-cn/filters/url_encode.html +++ b/zh-cn/filters/url_encode.html @@ -95,20 +95,20 @@

    把字符串中 URL 不安全的字符转义为百分号编码。

    输入

    -
    {{ "john@liquid.com" | url_encode }}
    +
    {{ "john@liquid.com" | url_encode }}

    输出

    -
    john%40liquid.com
    +
    john%40liquid.com

    输入

    -
    {{ "Tetsuro Takara" | url_encode }}
    +
    {{ "Tetsuro Takara" | url_encode }}

    输出

    -
    Tetsuro+Takara
    +
    Tetsuro+Takara
    diff --git a/zh-cn/filters/where.html b/zh-cn/filters/where.html index e5bdba9b0..be9d2e169 100644 --- a/zh-cn/filters/where.html +++ b/zh-cn/filters/where.html @@ -96,29 +96,66 @@

    按照数组中对象的属性值来过滤得到新数组,如果未指定第二个参数(属性值)则过滤得到所有属性值为 truthy 的对象。

    下面的例子中,假设你有一个 products 列表并且希望展示其中的厨房产品。使用 where 过滤器可以得到一个只包含 "type" 属性值为 "kitchen" 的元素的数组。

    输入

    -
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign kitchen_products = products | where: "type", "kitchen" %}

    Kitchen products:
    {% for product in kitchen_products %}
    - {{ product.title }}
    {% endfor %}
    +
    All products:
    +{% for product in products %}
    +- {{ product.title }}
    +{% endfor %}
    +
    +{% assign kitchen_products = products | where: "type", "kitchen" %}
    +
    +Kitchen products:
    +{% for product in kitchen_products %}
    +- {{ product.title }}
    +{% endfor %}

    输出

    -
    All products:
    - Vacuum
    - Spatula
    - Television
    - Garlic press

    Kitchen products:
    - Spatula
    - Garlic press
    +
    All products:
    +- Vacuum
    +- Spatula
    +- Television
    +- Garlic press
    +
    +Kitchen products:
    +- Spatula
    +- Garlic press

    如果你有一个产品列表且希望只显示可用的产品,可以用 where 过滤器但不指定目标值,LiquidJS 会过滤得到 "available" 值为 truthy 的产品列表。

    输入

    -
    All products:
    {% for product in products %}
    - {{ product.title }}
    {% endfor %}

    {% assign available_products = products | where: "available" %}

    Available products:
    {% for product in available_products %}
    - {{ product.title }}
    {% endfor %}
    +
    All products:
    +{% for product in products %}
    +- {{ product.title }}
    +{% endfor %}
    +
    +{% assign available_products = products | where: "available" %}
    +
    +Available products:
    +{% for product in available_products %}
    +- {{ product.title }}
    +{% endfor %}

    输出

    -
    All products:
    - Coffee mug
    - Limited edition sneakers
    - Boring sneakers

    Available products:
    - Coffee mug
    - Boring sneakers
    +
    All products:
    +- Coffee mug
    +- Limited edition sneakers
    +- Boring sneakers
    +
    +Available products:
    +- Coffee mug
    +- Boring sneakers

    where 后面再加一个 first 可以用来得到单个元素。例如,你要展示秋季系列里的单个 T-shirt。

    输入

    -
    {% assign new_shirt = products | where: "type", "shirt" | first %}

    Featured product: {{ new_shirt.title }}
    +
    {% assign new_shirt = products | where: "type", "shirt" | first %}
    +
    +Featured product: {{ new_shirt.title }}

    输出

    -
    Featured product: Hawaiian print sweater vest
    +
    Featured product: Hawaiian print sweater vest
    - +
    diff --git a/zh-cn/tags/assign.html b/zh-cn/tags/assign.html index eb68b5b72..ceac7ccac 100644 --- a/zh-cn/tags/assign.html +++ b/zh-cn/tags/assign.html @@ -95,21 +95,25 @@

    创建一个新变量。

    输入

    -
    {% assign my_variable = false %}
    {% if my_variable != true %}
    This statement is valid.
    {% endif %}
    +
    {% assign my_variable = false %}
    +{% if my_variable != true %}
    +  This statement is valid.
    +{% endif %}

    输出

    -
    This statement is valid.
    +
    This statement is valid.

    用引号(")包起来表示一个字符串。

    输入

    -
    {% assign foo = "bar" %}
    {{ foo }}
    +
    {% assign foo = "bar" %}
    +{{ foo }}

    输出

    -
    bar
    +
    bar
    diff --git a/zh-cn/tags/capture.html b/zh-cn/tags/capture.html index 3390483b3..4bee74c9c 100644 --- a/zh-cn/tags/capture.html +++ b/zh-cn/tags/capture.html @@ -95,21 +95,29 @@

    capture 开闭标签之间的内容渲染后赋值给一个变量,这个变量的类型总是字符串。

    输入

    -
    {% capture my_variable %}I am being captured.{% endcapture %}
    {{ my_variable }}
    +
    {% capture my_variable %}I am being captured.{% endcapture %}
    +{{ my_variable }}

    输出

    -
    I am being captured.
    +
    I am being captured.

    capture 里可以使用 assign 创建的其他变量来构建复杂字符串:

    输入

    -
    {% assign favorite_food = "pizza" %}
    {% assign age = 35 %}

    {% capture about_me %}
    I am {{ age }} and my favorite food is {{ favorite_food }}.
    {% endcapture %}

    {{ about_me }}
    +
    {% assign favorite_food = "pizza" %}
    +{% assign age = 35 %}
    +
    +{% capture about_me %}
    +I am {{ age }} and my favorite food is {{ favorite_food }}.
    +{% endcapture %}
    +
    +{{ about_me }}

    输出

    -
    I am 35 and my favourite food is pizza.
    +
    I am 35 and my favourite food is pizza.
    diff --git a/zh-cn/tags/case.html b/zh-cn/tags/case.html index 8d4dd2fd2..1f9da04b2 100644 --- a/zh-cn/tags/case.html +++ b/zh-cn/tags/case.html @@ -95,14 +95,22 @@

    创建一个 switch 语句,把变量跟不同的值比较。case 创建 switch 语句,when 比较它的值。

    输入

    -
    {% assign handle = "cake" %}
    {% case handle %}
    {% when "cake" %}
    This is a cake
    {% when "cookie", "biscuit" %}
    This is a cookie
    {% else %}
    This is not a cake nor a cookie
    {% endcase %}
    +
    {% assign handle = "cake" %}
    +{% case handle %}
    +  {% when "cake" %}
    +     This is a cake
    +  {% when "cookie", "biscuit" %}
    +     This is a cookie
    +  {% else %}
    +     This is not a cake nor a cookie
    +{% endcase %}

    输出

    -
    This is a cake
    +
    This is a cake
    diff --git a/zh-cn/tags/comment.html b/zh-cn/tags/comment.html index 47011a293..89b7ecbc1 100644 --- a/zh-cn/tags/comment.html +++ b/zh-cn/tags/comment.html @@ -95,14 +95,16 @@

    让 Liquid 模板里一段代码不渲染。处于 comment 开闭标签之间的文本都不会输出,Liquid 代码都不会执行。

    输入

    -
    Anything you put between {% comment %} and {% endcomment %} tags
    is turned into a comment.
    +
    Anything you put between {% comment %} and {% endcomment %} tags
    +is turned into a comment.

    输出

    -
    Anything you put between  tags
    is turned into a comment.
    +
    Anything you put between  tags
    +is turned into a comment.
    diff --git a/zh-cn/tags/cycle.html b/zh-cn/tags/cycle.html index 2024243d9..1a1d3de6e 100644 --- a/zh-cn/tags/cycle.html +++ b/zh-cn/tags/cycle.html @@ -95,10 +95,16 @@

    循环一组字符串按照它们传入的顺序打印出来。每次调用 cycle 打印下一个参数。

    基本使用

    输入

    -
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    {% cycle "one", "two", "three" %}
    +
    {% cycle "one", "two", "three" %}
    +{% cycle "one", "two", "three" %}
    +{% cycle "one", "two", "three" %}
    +{% cycle "one", "two", "three" %}

    输出

    -
    one
    two
    three
    one
    +
    one
    +two
    +three
    +one

    cycle 可以用于:

      @@ -107,14 +113,20 @@

    参数

    一个模板中需要多个 cycle 时可以使用 “cycle 组” 参数。如果没有提供组名,使用同样参数调用的 cycle 会被认为处于同一组。

    输入

    -
    {% cycle "first": "one", "two", "three" %}
    {% cycle "second": "one", "two", "three" %}
    {% cycle "second": "one", "two", "three" %}
    {% cycle "first": "one", "two", "three" %}
    +
    {% cycle "first": "one", "two", "three" %}
    +{% cycle "second": "one", "two", "three" %}
    +{% cycle "second": "one", "two", "three" %}
    +{% cycle "first": "one", "two", "three" %}

    输出

    -
    one
    one
    two
    two
    +
    one
    +one
    +two
    +two
    diff --git a/zh-cn/tags/decrement.html b/zh-cn/tags/decrement.html index 19646d6f8..e95cca5d5 100644 --- a/zh-cn/tags/decrement.html +++ b/zh-cn/tags/decrement.html @@ -95,16 +95,20 @@

    创建一个新的数字类型的变量,每次调用都把它的值减一。第一次是 -1

    输入

    -
    {% decrement variable %}
    {% decrement variable %}
    {% decrement variable %}
    +
    {% decrement variable %}
    +{% decrement variable %}
    +{% decrement variable %}

    输出

    -
    -1
    -2
    -3
    +
    -1
    +-2
    +-3

    increment 一样,在 decrement 里声明的变量独立于 assigncapture 创建的变量。

    diff --git a/zh-cn/tags/for.html b/zh-cn/tags/for.html index 0294385fb..ab7ad37b1 100644 --- a/zh-cn/tags/for.html +++ b/zh-cn/tags/for.html @@ -96,94 +96,160 @@

    重复执行代码块的迭代标签。

    基本使用

    for…in

    重复执行一段代码。

    输入

    -
    {% for product in collection.products %}
    {{ product.title }}
    {% endfor %}
    +
    {% for product in collection.products %}
    +  {{ product.title }}
    +{% endfor %}

    输出

    -
    hat shirt pants
    +
    hat shirt pants

    else

    指定 for 循环的集合长度为零时执行的代码块。

    输入

    -
    {% for product in collection.products %}
    {{ product.title }}
    {% else %}
    The collection is empty.
    {% endfor %}
    +
    {% for product in collection.products %}
    +  {{ product.title }}
    +{% else %}
    +  The collection is empty.
    +{% endfor %}

    输出

    -
    The collection is empty.
    +
    The collection is empty.

    break

    遇到 break 标签时 for 循环停止执行。

    输入

    -
    {% for i in (1..5) %}
    {%- if i == 4 -%}
    {% break %}
    {%- else -%}
    {{ i }}
    {%- endif -%}
    {% endfor %}
    +
    {% for i in (1..5) %}
    +  {%- if i == 4 -%}
    +    {% break %}
    +  {%- else -%}
    +    {{ i }}
    +  {%- endif -%}
    +{% endfor %}

    输出

    -
    123
    +
    123

    continue

    遇到 continue 标签时跳过当前这次迭代。

    输入

    -
    {% for i in (1..5) %}
    {%- if i == 4 -%}
    {%- continue -%}
    {%- else -%}
    {{ i }}
    {%- endif -%}
    {% endfor %}
    +
    {% for i in (1..5) %}
    +  {%- if i == 4 -%}
    +    {%- continue -%}
    +  {%- else -%}
    +    {{ i }}
    +  {%- endif -%}
    +{% endfor %}

    输出

    -
    1235
    +
    1235

    forloop

    for 循环里有一个 forloop 变量可用,用来表示迭代的当前状态。

    forloop.first, forloop.lastforloop.length 属性:

    输入

    -
    {% for i in (1..5) %}
    {%- if forloop.first == true -%} First
    {%- elsif forloop.last == true -%} Last
    {%- else -%} {{ forloop.length }}
    {%- endif %}
    {% endfor -%}
    +
    {% for i in (1..5) %}
    +  {%- if forloop.first == true -%} First
    +  {%- elsif forloop.last == true -%} Last
    +  {%- else -%} {{ forloop.length }}
    +  {%- endif %}
    +{% endfor -%}

    输出

    -
    First
    5
    5
    5
    Last
    +
    First
    +5
    +5
    +5
    +Last

    forloop.index, forloop.index0, forloop.rindexforloop.rindex0 属性:

    输入

    -
    index index0 rindex rindex0
    {% for i in (1..5) %}
    {{- forloop.index }} {{ forloop.index0 }} {{ forloop.rindex }} {{ forloop.rindex0 }}
    {% endfor -%}
    +
    index index0 rindex rindex0
    +{% for i in (1..5) %}
    +  {{- forloop.index }}     {{ forloop.index0 }}      {{ forloop.rindex }}      {{ forloop.rindex0 }}
    +{% endfor -%}

    输出

    -
    index index0 rindex rindex0
    1 0 5 4
    2 1 4 3
    3 2 3 2
    4 3 2 1
    5 4 1 0
    +
    index index0 rindex rindex0
    +1     0      5      4
    +2     1      4      3
    +3     2      3      2
    +4     3      2      1
    +5     4      1      0

    参数

    limit

    限制循环执行的次数。

    输入

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{- item -}}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    +{% for item in array limit:2 %}
    +  {{- item -}}
    +{% endfor %}

    输出

    -
    12
    +
    12

    offset

    从指定的下标处开始循环。

    输入

    -
    <!-- for array = [1,2,3,4,5,6] -->
    {% for item in array offset:2 %}
    {{- item -}}
    {% endfor %}
    +
    <!-- for array = [1,2,3,4,5,6] -->
    +{% for item in array offset:2 %}
    +  {{- item -}}
    +{% endfor %}

    输出

    -
    3456
    +
    3456

    offset:continue

    v9.33.0

    offset 的值可以是 continue,用来继续上一次循环。例如:

    输入

    -
    <!-- for array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{- item -}}
    {% endfor%}
    {% for item in array offset:continue %}
    {{- item -}}
    {% endfor%}
    +
    <!-- for array = [1,2,3,4,5,6] -->
    +{% for item in array limit:2 %}
    +  {{- item -}}
    +{% endfor%}
    +{% for item in array offset:continue %}
    +  {{- item -}}
    +{% endfor%}

    输出

    -
    12
    3456
    +
    12
    +3456

    对同样的变量名和集合名(这个例子中是 "item-array"),存在唯一的位置记录。也就是说用新的变量名就可以开启一个新的循环:

    输入

    -
    <!-- for array = [1,2,3,4,5,6] -->
    {% for item in array limit:2 %}
    {{- item -}}
    {% endfor%}
    {% for item2 in array offset:continue %}
    {{- item2 -}}
    {% endfor%}
    +
    <!-- for array = [1,2,3,4,5,6] -->
    +{% for item in array limit:2 %}
    +  {{- item -}}
    +{% endfor%}
    +{% for item2 in array offset:continue %}
    +  {{- item2 -}}
    +{% endfor%}

    输出

    -
    12
    123456
    +
    12
    +123456

    range

    定义一个用于循环的数字范围。可以用字面量定义范围,也可以用变量定义范围。

    输入

    -
    {% for i in (3..5) %}
    {{ i }}
    {% endfor %}

    {% assign num = 4 %}
    {% for i in (1..num) %}
    {{ i }}
    {% endfor %}
    +
    {% for i in (3..5) %}
    +  {{ i }}
    +{% endfor %}
    +
    +{% assign num = 4 %}
    +{% for i in (1..num) %}
    +  {{ i }}
    +{% endfor %}

    输出

    -
    3 4 5
    1 2 3 4
    +
    3 4 5
    +1 2 3 4

    reversed

    反转循环的顺序。注意这个参数的拼写和过滤器 reverse 不同。

    输入

    -
    <!-- if array = [1,2,3,4,5,6] -->
    {% for item in array reversed %}
    {{ item }}
    {% endfor %}
    +
    <!-- if array = [1,2,3,4,5,6] -->
    +{% for item in array reversed %}
    +  {{ item }}
    +{% endfor %}

    输出

    -
    6 5 4 3 2 1
    +
    6 5 4 3 2 1
    diff --git a/zh-cn/tags/if.html b/zh-cn/tags/if.html index 8380012f7..774a1c464 100644 --- a/zh-cn/tags/if.html +++ b/zh-cn/tags/if.html @@ -95,22 +95,31 @@

    条件为 true 时执行某个代码块。

    if

    输入

    -
    {% if product.title == "Awesome Shoes" %}
    These shoes are awesome!
    {% endif %}
    +
    {% if product.title == "Awesome Shoes" %}
    +  These shoes are awesome!
    +{% endif %}

    输出

    -
    These shoes are awesome!
    +
    These shoes are awesome!

    elsif / else

    ifunless 块中添加更多的条件。

    输入

    -
    <!-- If customer.name = "anonymous" -->
    {% if customer.name == "kevin" %}
    Hey Kevin!
    {% elsif customer.name == "anonymous" %}
    Hey Anonymous!
    {% else %}
    Hi Stranger!
    {% endif %}
    +
    <!-- If customer.name = "anonymous" -->
    +{% if customer.name == "kevin" %}
    +  Hey Kevin!
    +{% elsif customer.name == "anonymous" %}
    +  Hey Anonymous!
    +{% else %}
    +  Hi Stranger!
    +{% endif %}

    输出

    -
    Hey Anonymous!
    +
    Hey Anonymous!
    diff --git a/zh-cn/tags/include.html b/zh-cn/tags/include.html index f9006d03a..821d9ea19 100644 --- a/zh-cn/tags/include.html +++ b/zh-cn/tags/include.html @@ -97,30 +97,32 @@

    引入一个模板

    从模板 根路径 引入一个模板:

    -
    {% include 'footer.liquid' %}
    +
    {% include 'footer.liquid' %}

    设置 extname 选项为 ".liquid" 后上面的 .liquid 后缀就可以省略了,等价于:

    -
    {% include 'footer' %}
    +
    {% include 'footer' %}

    通过 include 渲染一个子模板时,它内部的代码可以访问父模板的变量,但父模板中不能访问它里面定义的变量。

    变量传递

    父模板里定义的变量可以通过 include 标签的参数列表传递给子模板:

    -
    {% assign my_variable = 'apples' %}
    {% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    +{% include 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    with 参数

    使用 with...as 语法可以给子模板传递一个变量:

    -
    {% assign featured_product = all_products['product_handle'] %}
    {% include 'product' with featured_product as product %}
    +
    {% assign featured_product = all_products['product_handle'] %}
    +{% include 'product' with featured_product as product %}

    上面的例子中,子模板中 product 会保有父模板中的 featured_product 变量的值。

    输出和过滤器

    文件名为字符串字面量时,支持 Liquid 输出和过滤器。在拼接文件名时很方便:

    -
    {% include "prefix/{{name | append: \".html\"}}" %}
    +
    {% include "prefix/{{name | append: \".html\"}}" %}
    转义

    字符串字面量里的 " 需要转义为 \",使用静态文件名可以避免这个问题,见下面的 Jekyll-like 文件名。

    Jekyll-like 文件名

    设置 dynamicPartialsfalse 来启用 Jekyll-like 文件名,这时文件名不需要用引号包含,会被当作字面量处理。 这样的字符串里面仍然支持 Liquid 输出和过滤器,例如:

    -
    {% include prefix/{{ page.my_variable }}/suffix %}
    +
    {% include prefix/{{ page.my_variable }}/suffix %}

    这样文件名里的 " 就不用转义了。

    -
    {% include prefix/{{name | append: ".html"}} %}
    +
    {% include prefix/{{name | append: ".html"}} %}

    Jekyll include

    v9.33.0

    @@ -131,18 +133,24 @@
  • 参数放到了 include 变量下,而非当前作用域。
  • 例如下面的模板:

    -
    {% include article.html header="HEADER" content="CONTENT" %}
    +
    {% include article.html header="HEADER" content="CONTENT" %}

    其中 article.html 的内容是:

    -
    <article>
    <header>{{include.header}}</header>
    {{include.content}}
    </article>
    +
    <article>
    +  <header>{{include.header}}</header>
    +  {{include.content}}
    +</article>

    注意我们通过 include.header 引用第一个参数,而不是 header。输出如下:

    -
    <article>
    <header>HEADER</header>
    CONTENT
    </article>
    +
    <article>
    +  <header>HEADER</header>
    +  CONTENT
    +</article>
    diff --git a/zh-cn/tags/increment.html b/zh-cn/tags/increment.html index df1262228..e1cc60774 100644 --- a/zh-cn/tags/increment.html +++ b/zh-cn/tags/increment.html @@ -95,23 +95,34 @@

    创建一个新的数字类型的变量,每次调用都把它的值加一。第一次为 0

    输入

    -
    {% increment my_counter %}
    {% increment my_counter %}
    {% increment my_counter %}
    +
    {% increment my_counter %}
    +{% increment my_counter %}
    +{% increment my_counter %}

    输出

    -
    0
    1
    2
    +
    0
    +1
    +2

    increment 里声明的变量独立于 assigncapture 创建的变量。

    下面的例子中通过 assign 创建了变量 var。然后用 increment 标签在同名变量上多次递增。注意 increment 标签不会影响 assign 创建的 var 的值。

    输入

    -
    {% assign var = 10 %}
    {% increment var %}
    {% increment var %}
    {% increment var %}
    {{ var }}
    +
    {% assign var = 10 %}
    +{% increment var %}
    +{% increment var %}
    +{% increment var %}
    +{{ var }}

    输出

    -
    0
    1
    2
    10
    +
    0
    +1
    +2
    +10
    diff --git a/zh-cn/tags/layout.html b/zh-cn/tags/layout.html index bf0bc95c8..36bf6bb74 100644 --- a/zh-cn/tags/layout.html +++ b/zh-cn/tags/layout.html @@ -94,23 +94,29 @@

    v1.9.1

    使用布局模板

    套用模板 根路径 下的某个布局模板中。

    -
    {% layout 'footer.liquid' %}
    +
    {% layout 'footer.liquid' %}

    设置 extname 选项为 ".liquid" 后上面的 .liquid 后缀就可以省略了,等价于:

    -
    {% layout 'footer' %}
    +
    {% layout 'footer' %}

    通过 layout 渲染一个子模板时,它内部的代码可以访问父模板的变量,但父模板中不能访问它里面定义的变量。

    变量传递

    当前模板里定义的变量可以通过 layout 标签的参数列表传递给布局模板:

    -
    {% assign my_variable = 'apples' %}
    {% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
    +
    {% assign my_variable = 'apples' %}
    +{% layout 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

    布局模板中可以包含若干 block 标签,这些 block 渲染时会按照子模板提供的内容进行填充。例如我们有布局模板 default-layout.liquid

    -
    Header
    {% block content %}My default content{% endblock %}
    Footer
    +
    Header
    +{% block content %}My default content{% endblock %}
    +Footer

    它被子模板 page.liquid 通过 layout 标签引用:

    -
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}
    +
    {% layout "default-layout" %}
    +{% block content %}My page content{% endblock %}

    page.liquid 的渲染结果将会是:

    -
    Header
    My page content
    Footer
    +
    Header
    +My page content
    +Footer
    • 一个布局模板中可以定义多个块;
    • @@ -121,7 +127,7 @@ diff --git a/zh-cn/tags/overview.html b/zh-cn/tags/overview.html index b9842d39b..72bf1b207 100644 --- a/zh-cn/tags/overview.html +++ b/zh-cn/tags/overview.html @@ -130,7 +130,7 @@
      - +
      diff --git a/zh-cn/tags/raw.html b/zh-cn/tags/raw.html index 573d8a763..cb0328e41 100644 --- a/zh-cn/tags/raw.html +++ b/zh-cn/tags/raw.html @@ -95,14 +95,17 @@

      raw 标签可以暂时禁用 LiquidJS 的语法。生成和 Liquid 冲突的语言(比如 Nunjucks、Handlebars)时很有用。

      输入

      -
      {% raw %}
      In Handlebars, {{ this }} will be HTML-escaped, but
      {{{ that }}} will not.
      {% endraw %}
      +
      {% raw %}
      +  In Handlebars, {{ this }} will be HTML-escaped, but
      +  {{{ that }}} will not.
      +{% endraw %}

      输出

      -
      In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
      +
      In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
      diff --git a/zh-cn/tags/render.html b/zh-cn/tags/render.html index 459331c47..62130b509 100644 --- a/zh-cn/tags/render.html +++ b/zh-cn/tags/render.html @@ -94,24 +94,27 @@

      v9.2.0

      基本使用

      渲染一个模板

      从模板 根路径 引入一个模板:

      -
      {% render 'footer.liquid' %}
      +
      {% render 'footer.liquid' %}

      设置 extname 选项为 ".liquid" 后上面的 .liquid 后缀就可以省略了,等价于:

      -
      {% render 'footer' %}
      +
      {% render 'footer' %}
      变量作用域

      通过 render 渲染一个子模板时,它内部的代码不能访问父模板的变量,父模板中也不能访问它里面定义的变量。这个封装会让模板代码更容易理解和维护。

      变量传递

      父模板里定义的变量可以通过 render 标签的参数列表传递给子模板:

      -
      {% assign my_variable = 'apples' %}
      {% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}
      +
      {% assign my_variable = 'apples' %}
      +{% render 'name', my_variable: my_variable, my_other_variable: 'oranges' %}

      全局变量 不需要传递,所有文件都可以访问它们。

      参数

      with 参数

      使用 with...as 语法可以给子模板传递一个变量:

      -
      {% assign featured_product = all_products['product_handle'] %}
      {% render 'product' with featured_product as product %}
      +
      {% assign featured_product = all_products['product_handle'] %}
      +{% render 'product' with featured_product as product %}

      上面的例子中,子模板中 product 会保有父模板中的 featured_product 变量的值。

      for 参数

      for...as 语法可以对可枚举对象的每一个值渲染一次子模板:

      -
      {% assign variants = product.variants %}
      {% render 'variant' for variants as variant %}
      +
      {% assign variants = product.variants %}
      +{% render 'variant' for variants as variant %}

      上面的例子中,对 product 的每个 variants 是指都会渲染一次子模板。子模板中 variant 变量会保有父模板中的 product.variants 中对应元素的值。

      forloop 对象

      使用 for 参数时,在子模板中可以访问 forloop 对象。

      @@ -120,7 +123,7 @@ diff --git a/zh-cn/tags/tablerow.html b/zh-cn/tags/tablerow.html index 6560e7d95..6fded3cb0 100644 --- a/zh-cn/tags/tablerow.html +++ b/zh-cn/tags/tablerow.html @@ -95,30 +95,101 @@

      生成一个 HTML 表示,上下必须用 <table></table> HTML 标签包裹起来。

      基本使用

      输入

      -
      <table>
      {% tablerow product in collection.products %}
      {{ product.title }}
      {% endtablerow %}
      </table>
      +
      <table>
      +{% tablerow product in collection.products %}
      +  {{ product.title }}
      +{% endtablerow %}
      +</table>

      输出

      -
      <table>
      <tr class="row1">
      <td class="col1">
      Cool Shirt
      </td>
      <td class="col2">
      Alien Poster
      </td>
      <td class="col3">
      Batman Poster
      </td>
      <td class="col4">
      Bullseye Shirt
      </td>
      <td class="col5">
      Another Classic Vinyl
      </td>
      <td class="col6">
      Awesome Jeans
      </td>
      </tr>
      </table>
      +
      <table>
      +  <tr class="row1">
      +    <td class="col1">
      +      Cool Shirt
      +    </td>
      +    <td class="col2">
      +      Alien Poster
      +    </td>
      +    <td class="col3">
      +      Batman Poster
      +    </td>
      +    <td class="col4">
      +      Bullseye Shirt
      +    </td>
      +    <td class="col5">
      +      Another Classic Vinyl
      +    </td>
      +    <td class="col6">
      +      Awesome Jeans
      +    </td>
      +  </tr>
      +</table>

      参数

      cols

      定义表格的列数。

      输入

      -
      {% tablerow product in collection.products cols:2 %}
      {{ product.title }}
      {% endtablerow %}
      +
      {% tablerow product in collection.products cols:2 %}
      +  {{ product.title }}
      +{% endtablerow %}

      输出

      -
      <table>
      <tr class="row1">
      <td class="col1">
      Cool Shirt
      </td>
      <td class="col2">
      Alien Poster
      </td>
      </tr>
      <tr class="row2">
      <td class="col1">
      Batman Poster
      </td>
      <td class="col2">
      Bullseye Shirt
      </td>
      </tr>
      <tr class="row3">
      <td class="col1">
      Another Classic Vinyl
      </td>
      <td class="col2">
      Awesome Jeans
      </td>
      </tr>
      </table>
      +
      <table>
      +  <tr class="row1">
      +    <td class="col1">
      +      Cool Shirt
      +    </td>
      +    <td class="col2">
      +      Alien Poster
      +    </td>
      +  </tr>
      +  <tr class="row2">
      +    <td class="col1">
      +      Batman Poster
      +    </td>
      +    <td class="col2">
      +      Bullseye Shirt
      +    </td>
      +  </tr>
      +  <tr class="row3">
      +    <td class="col1">
      +      Another Classic Vinyl
      +    </td>
      +    <td class="col2">
      +      Awesome Jeans
      +    </td>
      +  </tr>
      +</table>

      limit

      限制迭代次数。

      -
      {% tablerow product in collection.products cols:2 limit:3 %}
      {{ product.title }}
      {% endtablerow %}
      +
      {% tablerow product in collection.products cols:2 limit:3 %}
      +  {{ product.title }}
      +{% endtablerow %}

      offset

      从指定的下标处开始循环。

      -
      {% tablerow product in collection.products cols:2 offset:3 %}
      {{ product.title }}
      {% endtablerow %}
      +
      {% tablerow product in collection.products cols:2 offset:3 %}
      +  {{ product.title }}
      +{% endtablerow %}

      range

      定义一个用于循环的数字范围。可以用字面量定义范围,也可以用变量定义范围。

      -
      <!--variable number example-->

      {% assign num = 4 %}
      <table>
      {% tablerow i in (1..num) %}
      {{ i }}
      {% endtablerow %}
      </table>

      <!--literal number example-->

      <table>
      {% tablerow i in (3..5) %}
      {{ i }}
      {% endtablerow %}
      </table>
      +
      <!--variable number example-->
      +
      +{% assign num = 4 %}
      +<table>
      +{% tablerow i in (1..num) %}
      +  {{ i }}
      +{% endtablerow %}
      +</table>
      +
      +<!--literal number example-->
      +
      +<table>
      +{% tablerow i in (3..5) %}
      +  {{ i }}
      +{% endtablerow %}
      +</table>
      diff --git a/zh-cn/tags/unless.html b/zh-cn/tags/unless.html index fd569418f..8374289f5 100644 --- a/zh-cn/tags/unless.html +++ b/zh-cn/tags/unless.html @@ -95,17 +95,21 @@

      if 相反 —— 条件 不满足 时执行代码块。

      输入

      -
      {% unless product.title == "Awesome Shoes" %}
      These shoes are not awesome.
      {% endunless %}
      +
      {% unless product.title == "Awesome Shoes" %}
      +  These shoes are not awesome.
      +{% endunless %}

      输出

      -
      These shoes are not awesome.
      +
      These shoes are not awesome.

      等价于执行下面的代码:

      -
      {% if product.title != "Awesome Shoes" %}
      These shoes are not awesome.
      {% endif %}
      +
      {% if product.title != "Awesome Shoes" %}
      +  These shoes are not awesome.
      +{% endif %}
      - +
      diff --git a/zh-cn/tutorials/access-scope-in-filters.html b/zh-cn/tutorials/access-scope-in-filters.html index 0e085b32e..7d8ca0107 100644 --- a/zh-cn/tutorials/access-scope-in-filters.html +++ b/zh-cn/tutorials/access-scope-in-filters.html @@ -77,7 +77,7 @@
      @@ -92,10 +92,19 @@

      注册过滤器和标签 里介绍过,可以在函数参数里直接获得过滤器的参数:

      -
      // Usage: {{ 1 | add: 2, 3 }}
      // Output: 6
      engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
      +
      // Usage: {{ 1 | add: 2, 3 }}
      +// Output: 6
      +engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)

      但有些过滤器还需要访问当前上下文的变量,比如把 URL 路径转换为完整的 URL 时,需要访问上下文的 origin 变量:

      -
      // Usage: {{ '/index.html' | fullURL }}
      // Scope: { origin: "https://liquidjs.com" }
      // Output: https://liquidjs.com/index.html

      engine.registerFilter('fullURL', function (path) {
      const origin = this.context.get(['origin'])
      return new URL(path, origin).toString()
      })
      +
      // Usage: {{ '/index.html' | fullURL }}
      +// Scope: { origin: "https://liquidjs.com" }
      +// Output: https://liquidjs.com/index.html
      +
      +engine.registerFilter('fullURL', function (path) {
      +    const origin = this.context.get(['origin'])
      +    return new URL(path, origin).toString() 
      +})

      见这个 JSFiddle:http://jsfiddle.net/ctj364up/1/

      箭头函数

      在箭头函数里 this 会绑定到当前 JavaScript 上下文,你需要用 function(){} 来替代 ()=>{} 语法,才能正确地访问 this.context

      @@ -104,7 +113,7 @@
      @@ -151,7 +160,7 @@
    diff --git a/zh-cn/tutorials/caching.html b/zh-cn/tutorials/caching.html index 4a08286e0..1104f587d 100644 --- a/zh-cn/tutorials/caching.html +++ b/zh-cn/tutorials/caching.html @@ -77,7 +77,7 @@
    @@ -95,19 +95,34 @@

    LiquidJS 在这一方面比较灵活,提供了多种不同的方式来达到提升性能的目的。

    手动缓存

    .parse(), .parseFile(), .parseFileSync() API 可以用来把字符串或文件解析成模板。得到的模板可以用不同的数据去重复地渲染得到不同的 HTML。

    从字符串解析:

    -
    var tpl = engine.parse('{{name | capitalize}}');

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parse('{{name | capitalize}}');
    +
    +engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    +engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    从文件解析:

    -
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}

    engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    engine.renderSync(tpl, {name: 'bob'}) // 'Bob'
    +
    var tpl = engine.parseFileSync('hello');    // contents of `hello.liquid`: {{name}}
    +
    +engine.renderSync(tpl, {name: 'alice'}) // 'Alice'
    +engine.renderSync(tpl, {name: 'bob'}) // 'Bob'

    上述代码中字符串或文件只被解析了一次,可以反复利用去渲染不同的数据。有很多模板文件时可以把 tpl 变量存在 Map 中,后续再 .render() 时直接从 Map 中拿出解析好的模板去渲染。

    cache 选项

    如果你只用 .renderFile().renderFileSync() 也可以直接设置 [cache][cache] 选项,LiquidJS 会帮你缓存。

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: true
    });

    // LiquidJS 将会解析 hello.liquid 然后用 {name: 'alice'} 渲染它
    engine.renderFileSync('hello', {name: 'alice'})

    // LiquidJS 会找到上次 hello.liquid 解析的结果模板,再用 {name: 'bob'} 渲染它
    engine.renderFileSync('hello', {name: 'bob'})
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid({
    +    cache: true
    +});
    +
    +// LiquidJS 将会解析 hello.liquid 然后用 {name: 'alice'} 渲染它
    +engine.renderFileSync('hello', {name: 'alice'})
    +
    +// LiquidJS 会找到上次 hello.liquid 解析的结果模板,再用 {name: 'bob'} 渲染它
    +engine.renderFileSync('hello', {name: 'bob'})
    @@ -154,7 +169,7 @@ diff --git a/zh-cn/tutorials/changelog.html b/zh-cn/tutorials/changelog.html index ad0d5c7da..43a8b8288 100644 --- a/zh-cn/tutorials/changelog.html +++ b/zh-cn/tutorials/changelog.html @@ -77,7 +77,7 @@ @@ -555,7 +555,7 @@ diff --git a/zh-cn/tutorials/contribution-guidelines.html b/zh-cn/tutorials/contribution-guidelines.html index d91a2622a..f968230e8 100644 --- a/zh-cn/tutorials/contribution-guidelines.html +++ b/zh-cn/tutorials/contribution-guidelines.html @@ -77,7 +77,7 @@
    @@ -93,10 +93,10 @@

    Star on Github 👉 harttle/liquidjs

    Star 是支持 LiquidJS 最重要的方式,也是最简单的方式:通过提升排名来让更多人了解 LiquidJS,让它得到更好的改进。

    发起 Pull Request

    代码风格:LiquidJS 采用 standard@typescript-eslint/recommended 规则,提交前确保可以通过风格检查:

    -
    npm run lint
    +
    npm run lint

    测试:确保你改动之后测试仍然可以通过:

    -
    npm test
    +
    npm test

    提交消息:请遵守 Angular 提交消息规范,尤其注意 type 标识,semantic-release 机器人依赖这个标识自动发布。

    向后兼容:请考虑向后(之前的旧的版本)兼容。LiquidJS 被用于很多层的软件,包括底层库、编译器、站点生成器、 Web 服务器。对多数最终用户来说,驱动或请求整个系统做一次主版本升级是很难办到的。

    @@ -106,7 +106,7 @@
    - +
    @@ -153,7 +153,7 @@ diff --git a/zh-cn/tutorials/differences.html b/zh-cn/tutorials/differences.html index 47e2f9350..4da19d15b 100644 --- a/zh-cn/tutorials/differences.html +++ b/zh-cn/tutorials/differences.html @@ -77,7 +77,7 @@ @@ -153,7 +153,7 @@ diff --git a/zh-cn/tutorials/intro-to-liquid.html b/zh-cn/tutorials/intro-to-liquid.html index b4260a533..4f4609297 100644 --- a/zh-cn/tutorials/intro-to-liquid.html +++ b/zh-cn/tutorials/intro-to-liquid.html @@ -77,7 +77,7 @@

    输出

    输出 用于转换和输出变量到 HTMl。下面的模板将会把 username 的值插入到 input 的 value

    -
    <input type="text" name="user" value="{{username}}">
    +
    <input type="text" name="user" value="{{username}}">

    输出 里的值可以在输出之前经过若干个 过滤器 的转换。比如在变量后面追加一个字符串:

    -
    {{ username | append: ", welcome to LiquidJS!" }}
    +
    {{ username | append: ", welcome to LiquidJS!" }}

    过滤器可以级联,用起来像管道一样:

    -
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}
    +
    {{ username | append: ", welcome to LiquidJS!" | capitalize }}

    这里 是 LiquidJS 支持的完整的过滤器列表。

    标签

    标签 用于控制模板渲染过程,操作模板变量,和其他模板交互等。例如 assign 可以用来定义一个模板中可以使用的变量:

    -
    {% assign foo = "FOO" %}
    +
    {% assign foo = "FOO" %}

    一般标签成对地出现,一个开始标签和一个对应的结束标签,比如:

    -
    {% if foo == "FOO" %}
    Variable `foo` equals "FOO"
    {% else %}
    Variable `foo` not equals "FOO"
    {% endif %}
    +
    {% if foo == "FOO" %}
    +    Variable `foo` equals "FOO"
    +{% else %}
    +    Variable `foo` not equals "FOO"
    +{% endif %}

    这里 是 LiquidJS 支持的完整的标签列表。

    - +
    @@ -167,7 +171,7 @@ diff --git a/zh-cn/tutorials/migrate-to-9.html b/zh-cn/tutorials/migrate-to-9.html index d9285fa4c..0879cb037 100644 --- a/zh-cn/tutorials/migrate-to-9.html +++ b/zh-cn/tutorials/migrate-to-9.html @@ -77,7 +77,7 @@ @@ -162,7 +162,7 @@ diff --git a/zh-cn/tutorials/operators.html b/zh-cn/tutorials/operators.html index 9139ce172..5a67e16e6 100644 --- a/zh-cn/tutorials/operators.html +++ b/zh-cn/tutorials/operators.html @@ -77,7 +77,7 @@ @@ -152,7 +152,7 @@ diff --git a/zh-cn/tutorials/options.html b/zh-cn/tutorials/options.html index 425763f92..2bf5334db 100644 --- a/zh-cn/tutorials/options.html +++ b/zh-cn/tutorials/options.html @@ -77,7 +77,7 @@
    @@ -92,7 +92,10 @@

    Liquid 构造函数接受一个参数对象,用来定义各种模板引擎行为。这些参数都是可选的,比如我可以指定其中一个参数 cache

    -
    const { Liquid } = require('liquidjs')
    const engine = new Liquid({
    cache: true
    })
    +
    const { Liquid } = require('liquidjs')
    +const engine = new Liquid({
    +    cache: true
    +})
    API 文档

    下面的所有选项的概述,希望了解具体的类型和签名,请前往 LiquidOptions | API.

    @@ -107,10 +110,10 @@

    注意由于历史原因这个选项叫做 dynamicPartials,但它对 layout 也起作用。

    dynamicPartials 表示是否把传给 include, render, layout 标签的文件名当做变量处理。默认为 true。例如用上下文 { file: 'foo.html' } 渲染下面的模板将会引入文件 foo.html

    -
    {% include file %}
    +
    {% include file %}

    设置 dynamicPartials: false 后 LiquidJS 将会尝试去读取 file。当你的模板之间都是静态引入关系时会很有用:

    -
    {% liquid foo.html %}
    +
    {% liquid foo.html %}
    常见陷阱

    LiquidJS 把这个选项默认值设为 true 以兼容于 shopify/liquid,但如果你在使用 eleventy 它会设置默认值 false (参考 Quoted Include Paths)以兼容于 Jekyll。

    @@ -124,10 +127,18 @@
  • 参数放到了 include 变量下,而非当前作用域。
  • 例如下面的模板中,name.html 没有带引号,header"HEADER"= 分隔,header 参数通过 include.header 来引用。更多详情请参考 include

    -
    // entry template
    {% include article.html header="HEADER" content="CONTENT" %}

    // article.html
    <article>
    <header>{{include.header}}</header>
    {{include.content}}
    </article>
    +
    // entry template
    +{% include article.html header="HEADER" content="CONTENT" %}
    +
    +// article.html
    +<article>
    +  <header>{{include.header}}</header>
    +  {{include.content}}
    +</article>

    extname

    extname 定义了默认的文件后缀,当传入文件名不包含后缀时自动追加。默认值是 '' 也就是说默认是禁用的。如果设置为 .liquid

    -
    {% render "foo" %}  没有后缀,添加 ".liquid" 并加载 foo.liquid
    {% render "foo.html" %} 已经有后缀了,直接加载 foo.html
    +
    {% render "foo" %}  没有后缀,添加 ".liquid" 并加载 foo.liquid
    +{% render "foo.html" %} 已经有后缀了,直接加载 foo.html
    旧版行为

    在 2.0.1 之前,extname 默认值为 .liquid。要禁用它需要明确设置为 extname: ''。详情参考 #41

    @@ -140,7 +151,7 @@

    preserveTimezones 是一个布尔值,只影响时间戳字面量。当设置为 true 时,所有字面量的时间戳字符串会在输出时保持原状,即不论输入时采取怎样的时区,输出时仍然采用那一时区(和 Shopify Liquid 的行为一致)。注意这是一个解析器参数,渲染时传入的数据中的日期的输出不会受此参数影响。注意 preserveTimezonestimezoneOffset 的优先级更高。

    换行和缩进

    greedy, trimOutputLeft, trimOutputRight, trimTagLeft, trimTagRight 选项用来移除 Liquid 语法周围的换行和缩进,详情请参考 Whitespace Control

    自定义分隔符

    outputDelimiterLeft, outputDelimiterRight, tagDelimiterLeft, tagDelimiterRight 用来自定义 LiquidJS 中 标签和过滤器 的分隔符。例如设置了 outputDelimiterLeft: <%=, outputDelimiterRight: %> 后我们可以避免跟其他模板引擎冲突:

    -
    <%= username | append: ", welcome to LiquidJS!" %>
    +
    <%= username | append: ", welcome to LiquidJS!" %>

    严格模式

    strictFilters 用来启用过滤器的严格模式,如果设置为 true 过滤器不存在时解析会抛出异常。默认为 false,这时会跳过不存在的过滤器。

    strictVariables 用来启用变量严格模式。如果设置为 true 变量不存在时渲染会抛出异常,默认为 false 这时不存在的变量会被渲染为空字符串。

    @@ -151,7 +162,7 @@
    @@ -198,7 +209,7 @@ diff --git a/zh-cn/tutorials/parse-parameters.html b/zh-cn/tutorials/parse-parameters.html index ee4413d0f..d4e2d0cca 100644 --- a/zh-cn/tutorials/parse-parameters.html +++ b/zh-cn/tutorials/parse-parameters.html @@ -77,7 +77,7 @@
    @@ -92,32 +92,77 @@

    访问原始参数

    注册过滤器和标签 中提到,可以通过 tagToken.args 来得到标签的原始参数字符串。例如:

    -
    // Usage: {% random foo bar coo %}
    // Output: "foo", "bar" or "coo"
    engine.registerTag('random', {
    parse(tagToken) {
    // tagToken.args === "foo bar coo"
    this.items = tagToken.args.split(' ')
    },
    render(context, emitter) {
    // get a random index
    const index = Math.floor(this.items.length * Math.random())
    // output that item
    emitter.write(this.items[index])
    }
    })
    +
    // Usage: {% random foo bar coo %}
    +// Output: "foo", "bar" or "coo"
    +engine.registerTag('random', {
    +  parse(tagToken) {
    +    // tagToken.args === "foo bar coo"
    +    this.items = tagToken.args.split(' ')
    +  },
    +  render(context, emitter) {
    +    // get a random index
    +    const index = Math.floor(this.items.length * Math.random())
    +    // output that item
    +    emitter.write(this.items[index])
    +  }
    +})

    见这个 JSFiddle:http://jsfiddle.net/ctj364up/2/

    解析参数的值

    除了静态的参数字符串之外,我们更希望把动态的值传递给标签。LiquidJS 中的值可以是字面量(字符串、数字等,也可以是当前上下文的变量。

    下面是修改过的模板,也包含三个值用来随机。但它们表示的是值而不是静态的字符串。第一个是字符串字面量,第二个是标识符(表示变量),第三个是属性访问表达式,包含两个标识符。

    -
    {% random "foo" bar obj.coo %}
    +
    {% random "foo" bar obj.coo %}

    解析这么多种情况会很麻烦,但 LiquidJS 提供了 Tokenizer 类来处理这种情况。

    -
    const { Liquid, Tokenizer, evalToken } = require('liquidjs')

    engine.registerTag('random', {
    parse(tagToken) {
    const tokenizer = new Tokenizer(tagToken.args)
    this.items = []
    while (!tokenizer.end()) {
    // here readValue() returns a LiteralToken or PropertyAccessToken
    this.items.push(tokenizer.readValue())
    }
    },
    * render(context, emitter) {
    const index = Math.floor(this.items.length * Math.random())
    const token = this.items[index]
    // in LiquidJS, we use yield to wait for async call
    const value = yield evalToken(token, context)
    emitter.write(value)
    }
    })
    +
    const { Liquid, Tokenizer, evalToken } = require('liquidjs')
    +
    +engine.registerTag('random', {
    +  parse(tagToken) {
    +    const tokenizer = new Tokenizer(tagToken.args)
    +    this.items = []
    +    while (!tokenizer.end()) {
    +      // here readValue() returns a LiteralToken or PropertyAccessToken
    +      this.items.push(tokenizer.readValue())
    +    }
    +  },
    +  * render(context, emitter) {
    +    const index = Math.floor(this.items.length * Math.random())
    +    const token = this.items[index]
    +    // in LiquidJS, we use yield to wait for async call
    +    const value = yield evalToken(token, context)
    +    emitter.write(value)
    +  }
    +})

    用上下文 { bar: "bar", obj: { coo: "coo" } } 来调用这个标签可以得到上第一个例子一样的效果。见这个 JSFiddle:http://jsfiddle.net/ctj364up/3/.

    异步和 Promise

    在 LiquidJS 里异步用生成器实现,这样同样一份标签的实现也可以用于同步的 API 比如 renderSync()parseAndRenderSync()renderFileSync()。如果要在标签实现里等待 Promise,只需要把 await somePromise 换成 yield somePromise,并保留 * render() 不要改成 async render()。更多细节请参考 Sync and Async

    把键值对解析为命名参数

    当参数很多时或者有可选参数时,使用命名参数语法会很方便。这时参数由无序的键值对构成,LiquidJS 中的 Hash 类就是来处理这种情况的。

    -
    {% random from:2, to:max %}
    +
    {% random from:2, to:max %}

    上面的例子用来产生 [2, max] 范围内的随机数。我们要用 Hash 来解析 fromto 参数。

    -
    const { Liquid, Hash } = require('liquidjs')

    engine.registerTag('random', {
    parse(tagToken) {
    // 解析参数结果,存到 `this.args` 里
    this.args = new Hash(tagToken.args)
    },
    * render(context, emitter) {
    // 在当前 `context` 下计算参数的值
    const {from, to} = yield this.args.render(context)
    const length = to - from + 1
    const value = from + Math.floor(length * Math.random())
    emitter.write(value)
    }
    })
    +
    const { Liquid, Hash } = require('liquidjs')
    +
    +engine.registerTag('random', {
    +  parse(tagToken) {
    +    // 解析参数结果,存到 `this.args` 里
    +    this.args = new Hash(tagToken.args)
    +  },
    +  * render(context, emitter) {
    +    // 在当前 `context` 下计算参数的值
    +    const {from, to} = yield this.args.render(context)
    +    const length = to - from + 1
    +    const value = from + Math.floor(length * Math.random())
    +    emitter.write(value)
    +  }
    +})

    { max: 10 } 上下文上渲染 {% random from:2, to:max %} 将会得到 [2, 10] 范围内的随机数。见这个 JSFiddle:http://jsfiddle.net/ctj364up/4/

    @@ -163,7 +208,7 @@ diff --git a/zh-cn/tutorials/partials-and-layouts.html b/zh-cn/tutorials/partials-and-layouts.html index c67214706..fe40b1f5c 100644 --- a/zh-cn/tutorials/partials-and-layouts.html +++ b/zh-cn/tutorials/partials-and-layouts.html @@ -77,7 +77,7 @@
    @@ -92,19 +92,37 @@

    引用模板片段

    对于如下两个模板文件:

    -
    // 文件:color.liquid
    color: '{{ color }}' shape: '{{ shape }}'

    // 文件:theme.liquid
    {% assign shape = 'circle' %}
    {% include 'color' %}
    {% include 'color' with 'red' %}
    {% include 'color', color: 'yellow', shape: 'square' %}
    +
    // 文件:color.liquid
    +color: '{{ color }}' shape: '{{ shape }}'
    +
    +// 文件:theme.liquid
    +{% assign shape = 'circle' %}
    +{% include 'color' %}
    +{% include 'color' with 'red' %}
    +{% include 'color', color: 'yellow', shape: 'square' %}

    输出为:

    -
    color: '' shape: 'circle'
    color: 'red' shape: 'circle'
    color: 'yellow' shape: 'square'
    +
    color: '' shape: 'circle'
    +color: 'red' shape: 'circle'
    +color: 'yellow' shape: 'square'
    ".liquid" 文件扩展名

    如果设置了 extname: ".liquid" 选项,就可以省略 layout, renderinclude 里面文件名的 “.liquid” 后缀。详情请参考 extname 选项

    布局模板(模板继承)

    对于如下两个模板文件:

    -
    // 文件:default-layout.liquid
    Header
    {% block content %}My default content{% endblock %}
    Footer

    // 文件:page.liquid
    {% layout "default-layout" %}
    {% block content %}My page content{% endblock %}
    +
    // 文件:default-layout.liquid
    +Header
    +{% block content %}My default content{% endblock %}
    +Footer
    +
    +// 文件:page.liquid
    +{% layout "default-layout" %}
    +{% block content %}My page content{% endblock %}

    渲染 page.liquid 将会输出:

    -
    Header
    My page content
    Footer
    +
    Header
    +My page content
    +Footer
    Block
    • 布局文件(父模板)中可以定义多个 block;
    • @@ -113,7 +131,7 @@
    @@ -160,7 +178,7 @@ diff --git a/zh-cn/tutorials/plugins.html b/zh-cn/tutorials/plugins.html index c3ac35622..bec41f368 100644 --- a/zh-cn/tutorials/plugins.html +++ b/zh-cn/tutorials/plugins.html @@ -77,7 +77,7 @@
    @@ -94,11 +94,21 @@

    一组标签和过滤器可以封装为一个 插件,通常发包到 NPM 来方便使用。本文介绍如何创建和使用插件。

    编写插件

    LiquidJS 插件就是一个简单的函数,它的第一个参数是 Liquid 类,其中的 this 是它被注册到的 Liquid 实例。可以通过 this 来调用 Liquid API,比如 注册标签和过滤器

    现在我们来写一个插件并在其中注册一个过滤器,来把输入字符串转换为大写:

    -
    /**
    * Inside the plugin function, `this` refers to the Liquid instance.
    *
    * @param Liquid: provides facilities to implement tags and filters.
    */
    module.exports = function (Liquid) {
    this.registerFilter('upup', x => x.toUpperCase());
    }
    +
    /**
    + * Inside the plugin function, `this` refers to the Liquid instance.
    + *
    + * @param Liquid: provides facilities to implement tags and filters.
    + */
    +module.exports = function (Liquid) {
    +    this.registerFilter('upup', x => x.toUpperCase());
    +}

    把上述代码保存为 upup.js

    使用插件

    把插件传递给 .plugin() 方法即可注册插件,例如:

    -
    const engine = new Liquid()

    engine.plugin(require('./upup.js'));
    engine.parseAndRender('{{ "foo" | upup }}').then(console.log)
    +
    const engine = new Liquid()
    +
    +engine.plugin(require('./upup.js'));
    +engine.parseAndRender('{{ "foo" | upup }}').then(console.log)

    上述代码将会输出 "FOO"

    插件列表

    由于本仓库只包含 Shopify/liquid 核心仓库的标签和插件(参考 https://github.com/harttle/liquidjs#differences-and-limitations),Shopify 平台上特有的插件只能通过插件来使用。

    @@ -110,7 +120,7 @@
    @@ -157,7 +167,7 @@ diff --git a/zh-cn/tutorials/register-filters-tags.html b/zh-cn/tutorials/register-filters-tags.html index 231b56b22..85ea0de06 100644 --- a/zh-cn/tutorials/register-filters-tags.html +++ b/zh-cn/tutorials/register-filters-tags.html @@ -77,7 +77,7 @@
    @@ -91,25 +91,50 @@
    -

    注册标签

    // 使用方式: {% upper name %}
    engine.registerTag('upper', {
    parse: function(tagToken, remainTokens) {
    this.str = tagToken.args; // name
    },
    render: async function(scope, hash) {
    var str = await this.liquid.evalValue(this.str, scope); // 'alice'
    return str.toUpperCase() // 'Alice'
    }
    });
    +

    注册标签

    // 使用方式: {% upper name %}
    +engine.registerTag('upper', {
    +    parse: function(tagToken, remainTokens) {
    +        this.str = tagToken.args; // name
    +    },
    +    render: async function(scope, hash) {
    +        var str = await this.liquid.evalValue(this.str, scope); // 'alice'
    +        return str.toUpperCase()  // 'Alice'
    +    }
    +});
    • parse: 从 remainTokens 中读取后续的标签/输出/HTML,直到找到你期望的结束标签。
    • render: 把 scope 数据和此前解析得到的 Token 结合,输出 HTML 字符串。

    查看已有的标签实现:https://github.com/harttle/liquidjs/tree/master/src/builtin/tags

    -

    注册过滤器

    // 使用方式: {{ name | upper }}
    engine.registerFilter('upper', v => v.toUpperCase())
    +

    注册过滤器

    // 使用方式: {{ name | upper }}
    +engine.registerFilter('upper', v => v.toUpperCase())

    过滤器的参数将会传递给上面注册的过滤器函数,从第二个参数开始(第一个参数是过滤器左侧的输入),例如:

    -
    // Usage: {{ 1 | add: 2, 3 }}
    engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)
    +
    // Usage: {{ 1 | add: 2, 3 }}
    +engine.registerFilter('add', (initial, arg1, arg2) => initial + arg1 + arg2)

    查看已有的过滤器实现:https://github.com/harttle/liquidjs/tree/master/src/builtin/filters

    反注册标签/过滤器

    有时可能需要禁用一些标签/过滤器(比如 #324),注册一个假的标签/过滤器并在里面抛出相应的错误即可。

    -
    // 禁用标签
    const disabledTag = {
    parse: function(token) {
    throw new Error(`tag "${token.name}" disabled`);
    }
    }
    engine.registerTag('include', disabledTag);

    // 禁用过滤器
    function disabledFilter(name) {
    return function () {
    throw new Error(`filter "${name}" disabled`);
    }
    }
    engine.registerFilter('plus', disabledFilter('plus'));
    +
    // 禁用标签
    +const disabledTag = {
    +    parse: function(token) {
    +        throw new Error(`tag "${token.name}" disabled`);
    +    }
    +}
    +engine.registerTag('include', disabledTag);
    +
    +// 禁用过滤器
    +function disabledFilter(name) {
    +    return function () {
    +        throw new Error(`filter "${name}" disabled`);
    +    }
    +}
    +engine.registerFilter('plus', disabledFilter('plus'));
    @@ -156,7 +181,7 @@ diff --git a/zh-cn/tutorials/render-file.html b/zh-cn/tutorials/render-file.html index bd3daf196..a65d41e84 100644 --- a/zh-cn/tutorials/render-file.html +++ b/zh-cn/tutorials/render-file.html @@ -77,7 +77,7 @@
    @@ -93,20 +93,32 @@

    一个典型的项目会有一个目录下都是模板,最方便的方式就是设置 LiquidJS 的 root 然后调用 .renderFile().renderFileSync() 来渲染其中的一个模板文件。

    渲染一个文件

    例如你有如下的目录结构:

    -
    .
    ├── index.js
    └── views/
    ├── hello.liquid
    └── world.liquid
    +
    .
    +├── index.js
    +└── views/
    +  ├── hello.liquid
    +  └── world.liquid

    其中 hello.liquid 内容为:

    -
    name: {{name}}
    +
    name: {{name}}

    index.js 中可以这样渲染 hello.liquid:

    -
    var engine = new Liquid({
    root: path.resolve(__dirname, 'views/'), // 设置模板查找目录
    extname: '.liquid' // 添加后缀,默认为 "" 表示不添加后缀
    });
    // 将会读取并渲染 `views/hello.liquid`
    engine.renderFile("hello", {name: 'alice'}).then(console.log)
    +
    var engine = new Liquid({
    +    root: path.resolve(__dirname, 'views/'), // 设置模板查找目录
    +    extname: '.liquid' // 添加后缀,默认为 "" 表示不添加后缀
    +});
    +// 将会读取并渲染 `views/hello.liquid`
    +engine.renderFile("hello", {name: 'alice'}).then(console.log)

    执行 node index.js 你将会得到类似这样的输出:

    -
    name: alice
    +
    name: alice

    模板查找

    传递给 .renderFile(), .parseFile() .renderFileSync(), .parseFileSync() 这些 API 的模板名,
    以及传递给 include, layout 这些标签的模板名,将会根据 root 选项来查找。

    root 可以设置为 string 类型的路径(见上面的例子), 也可以设置为一个字符串数组表示路径列表,这时 LiquidJS 将会按顺序去查找。例如:

    -
    var engine = new Liquid({
    root: ['views/', 'views/partials/'],
    extname: '.liquid'
    });
    +
    var engine = new Liquid({
    +    root: ['views/', 'views/partials/'],
    +    extname: '.liquid'
    +});
    相对路径

    root 中使用相对路径将会被解释为相对于 cwd()(当前工作目录)。

    @@ -129,12 +141,31 @@

    文件系统接口

    LiquidJS 定义了一个文件系统接口(src/fs/ifs.ts),在 Node.js 下的默认实现是 src/fs/node.ts,在浏览器打包文件中的默认实现是 src/fs/browser.ts
    你可以通过创建 Liquid 时的 fs 参数来指定一个自定义实现来指定如何读取模板文件。比如从数据库里读取:

    -
    const engine = new Liquid({
    fs: {
    readFileSync (file) {
    return db.model('Template').findByIdSync(file).text
    },
    await readFile (file) {
    const template = await db.model('Template').findById(file)
    return template.text
    },
    existsSync () {
    return true
    },
    await exists () {
    return true
    },
    resolve(root, file, ext) {
    return file
    }
    }
    });
    +
    const engine = new Liquid({
    +    fs: {
    +        readFileSync (file) {
    +            return db.model('Template').findByIdSync(file).text
    +        },
    +        await readFile (file) {
    +            const template = await db.model('Template').findById(file)
    +            return template.text
    +        },
    +        existsSync () {
    +            return true
    +        },
    +        await exists () {
    +            return true
    +        },
    +        resolve(root, file, ext) {
    +            return file
    +        }
    +    }
    +});
    @@ -181,7 +212,7 @@ diff --git a/zh-cn/tutorials/render-tag-content.html b/zh-cn/tutorials/render-tag-content.html new file mode 100644 index 000000000..9e855525a --- /dev/null +++ b/zh-cn/tutorials/render-tag-content.html @@ -0,0 +1,269 @@ + + + + + 渲染标签内容 | LiquidJS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    +
    + +
    +
    +
    +
    +
    +

    渲染标签内容

    + + + +
    +
    +

    自定义标签可以有内容,也可以嵌套使用。本文描述了如何实现一个由开始标签结束标签和之间的标签内容的自定义标签。

    +

    渲染标签内容

    我们先实现一个简单的 wrap 标签,它会把内容包装在 <div class="wrapper"></div> 元素里:

    +
    {% wrap %}
    +  {{ "hello world!" | capitalize }}
    +{% endwrap %}
    + +

    期望输出:

    +
    <div class='wrapper'>
    +  Hello world!
    +</div>
    + +

    首先 注册 一个名为 wrap 的标签,把内容解析到 this.tpls 数组里。parse(tagToken, remainTokens) 中,

    +
      +
    • tagToken 是当前 Token {% wrap %}
    • +
    • remainTokens 是当前模板中后续所有 Token 的数组。
    • +
    +

    我们要做的是从 remainTokens 里拿出来/.shift() 足够的标签直到遇到 endwrap(其实可以是任意名字,但按照惯例应该叫 endwrap)。如果到模板结尾都没遇到 endwrap,需要抛出一个标签未关闭的 Error

    +
    engine.registerTag('wrap', {
    +  parse(tagToken, remainTokens) {
    +    this.tpls = []
    +    let closed = false
    +    while(remainTokens.length) {
    +      let token = remainTokens.shift()
    +      // 得到了结束标签,停止解析
    +      if (token.name === 'endwrap') {
    +        closed = true
    +        break
    +      }
    +      // 把 Token 解析成 Template
    +      // parseToken() 可能会消耗多个 Token
    +      // 例如 {% if %}...{% endif %}
    +      let tpl = this.liquid.parser.parseToken(token, remainTokens)
    +      this.tpls.push(tpl)
    +    }
    +    if (!closed) throw new Error(`tag ${tagToken.getText()} not closed`)
    +  },
    +  * render(context, emitter) {
    +    emitter.write("<div class='wrapper'>")
    +    yield this.liquid.renderer.renderTemplates(this.tpls, context, emitter)
    +    emitter.write("</div>")
    +  }
    +})
    + +

    .renderTemplates() 可能是异步的,因此需要 yield 来等它完成。更多关于 LiquidJS 异步的信息可以参考 同步和异步render() 的其他部分比较直观,这是 JSFiddle 版本:http://jsfiddle.net/por0zcn1/3/

    +

    使用 ParseStream

    对于像 forif 这样的复杂标签,parse() 会变得很复杂。使用 ParseStream 工具可以按事件风格来组织 parse() 的逻辑。下面是用 ParseStream 重写过的 parse(),实现了和上面例子中完全一样的功能。

    +
    parse(tagToken, remainTokens) {
    +  this.tpls = []
    +  this.liquid.parser.parseStream(remainTokens)
    +    .on('template', tpl => this.tpls.push(tpl))
    +    // 注意这里不能用箭头函数,因为我们需要 `this`
    +    .on('tag:endwrap', function () { this.stop() })
    +    .on('end', () => { throw new Error(`tag ${tagToken.getText()} not closed`) })
    +    .start()
    +}
    + +

    这是 JSFiddle 链接:http://jsfiddle.net/por0zcn1/4/。简单起见,下面的例子都借助 ParseStream 来实现。

    +

    操作上下文

    上面的 wrap 标签看起来没什么用,反正没它也可以很容易地渲染那部分内容。我们现在来实现一个 repeat 标签,把内容渲染两次(还可以加个参数让它渲染任意次):

    +
    {% repeat %}
    +  {{ repeat.i }}. {{ "hello world!" | capitalize }}
    +{% endrepeat %}`
    + +

    期望输出:

    +
    1. Hello world!
    +2. Hello world!
    + +

    你可能注意到了在 repeat 上下文里有个额外的变量 repeat.i,这就需要我们操作 上下文

    +
    上下文

    上下文 定义了 Liquid 模板中每个变量的值。在 LiquidJS 中,Context 由一个 Scope 的栈组成。Scope 就是一个普通对象,就像传给 engine.render(tpl, scope)scope 一样。

    +
    + +

    每次进入新的 上下文 时,我们需要 push 一个新的 Scope。当结束渲染并退出 上下文 时,再把 Scope上下文 pop 出来。见下面的实现:

    +
    engine.registerTag('repeat', {
    +  parse(tagToken, remainTokens) {
    +    this.tpls = []
    +    this.liquid.parser.parseStream(remainTokens)
    +      .on('template', tpl => this.tpls.push(tpl))
    +      .on('tag:endrepeat', function () { this.stop() })
    +      .on('end', () => { throw new Error(`tag ${tagToken.getText()} not closed`) })
    +      .start()
    +  },
    +  * render(context, emitter) {
    +    const repeat = { i: 1 }
    +    context.push({ repeat })
    +    yield this.liquid.renderer.renderTemplates(this.tpls, context, emitter)
    +    repeat.i++
    +    yield this.liquid.renderer.renderTemplates(this.tpls, context, emitter)
    +    context.pop()
    +  }
    +})
    + +

    parse() 部分和 wrap 标签完全相同,在 render() 部分我们通过调用两次 .renderTemplates(this.tpls) 来重复渲染内容。这是 JSFiddle 链接:http://jsfiddle.net/por0zcn1/2/

    +
    成对使用 Push 和 Pop

    必须成对地使用 context.push()context.pop()。如果忘记 pop() 会导致 Scope 泄露给后面的模板内容,也可能损坏 上下文 栈。.

    +
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    + + + +
    +
    + + + + + + + + + + + \ No newline at end of file diff --git a/zh-cn/tutorials/setup.html b/zh-cn/tutorials/setup.html index 0153c3f51..5c9784afd 100644 --- a/zh-cn/tutorials/setup.html +++ b/zh-cn/tutorials/setup.html @@ -77,7 +77,7 @@
    @@ -93,21 +93,32 @@

    如果你还不了解 Liquid 模板语言,请参考 Liquid 模板语言简介

    在 Node.js 里使用

    通过 NPM 安装:

    -
    npm install --save liquidjs
    +
    npm install --save liquidjs
    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // 输出 'Alice'
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid();
    +
    +engine
    +    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    +    .then(console.log);     // 输出 'Alice'
    示例

    这里有一个 LiquidJS 在 Node.js 里使用的例子:liquidjs/demo/nodejs/.

    LiquidJS 的类型定义也导出并发布到了 NPM 包里,写 TypeScript 的项目可以直接这样使用:

    -
    import { Liquid } from 'liquidjs';
    const engine = new Liquid();

    engine
    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    .then(console.log); // 输出 'Alice'
    +
    import { Liquid } from 'liquidjs';
    +const engine = new Liquid();
    +
    +engine
    +    .parseAndRender('{{name | capitalize}}', {name: 'alice'})
    +    .then(console.log);     // 输出 'Alice'
    示例

    这里有一个 LiquidJS 在 TypeScript 下的例子:liquidjs/demo/typescript/.

    在浏览器里使用

    LiquidJS 预先构建了 UMD Bundle,可以通过 jsDelivr CDN 来引用:

    -
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>     <!--生产环境-->
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script> <!--开发环境-->
    +
    <script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>     <!--生产环境-->
    +<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.umd.js"></script>         <!--开发环境-->
    示例

    这里有一个 jsFiddle 上的在线例子:jsfiddle.net/x43eb0z6,其源码也可以在 liquidjs/demo/browser/ 找到。

    @@ -116,16 +127,16 @@

    在命令行里使用

    你还可以在命令行里使用 LiquidJS:

    -
    echo '{{"hello" | capitalize}}' | npx liquidjs
    +
    echo '{{"hello" | capitalize}}' | npx liquidjs

    模板来自标准输入,数据则来自参数,这个参数可以是一个 JSON 文件的路径,也可以是一个 JSON 字符串:

    -
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'
    +
    echo 'Hello, {{ name }}.' | npx liquidjs '{"name": "Snake"}'

    其他

    @stevenanthonyrevo 还提供了一个 ReactJS demo,请参考 liquidjs/demo/reactjs/

    @@ -172,7 +183,7 @@ diff --git a/zh-cn/tutorials/sync-and-async.html b/zh-cn/tutorials/sync-and-async.html index 103a3fcca..4bdda3281 100644 --- a/zh-cn/tutorials/sync-and-async.html +++ b/zh-cn/tutorials/sync-and-async.html @@ -77,7 +77,7 @@
    @@ -117,20 +117,47 @@

    等待 Promise

    但 LiquidJS 是支持 Promise 的,你仍然可以调用返回 Promise 的方法并等它 resolve。只需要把 await 换成 yield 并保留 * render() 不要改成 async render()。例如:

    -
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'

    // Usage: {% upper "alice" %}
    // Output: ALICE
    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args
    },
    * render: function(ctx: Context) {
    // 同步调用时 `ctx.sync == true`,`_evalValue()` 会同步地执行
    var str = yield this.liquid._evalValue(this.str, ctx)
    return str.toUpperCase()
    }
    })
    +
    import { TagToken, Context, Emitter, TopLevelToken } from 'liquidjs'
    +
    +// Usage: {% upper "alice" %}
    +// Output: ALICE
    +engine.registerTag('upper', {
    +    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    +        this.str = tagToken.args
    +    },
    +    * render: function(ctx: Context) {
    +        // 同步调用时 `ctx.sync == true`,`_evalValue()` 会同步地执行
    +        var str = yield this.liquid._evalValue(this.str, ctx)
    +        return str.toUpperCase()
    +    }
    +})

    见这个 JSFiddle:http://jsfiddle.net/ctj364up/6/

    只支持异步的标签

    对于只用于异步 API 的标签,或者只能实现为异步的标签,使用生成器语法和 async 语法并没有区别。

    例如,如果上面的 this.liquid._evalValue() 不会检查 ctx.sync 而且总是返回一个 Promise,那么即使这个标签用 * render()yield this.liquid._evalValue() 实现,最终也会渲染成 <object Promise>

    这时可以直接使用 async 语法。注意有些 LiquidJS API 会返回 Promise,有些会返回生成器。你需要用 toPromise API 来把生成器转换为 Promise,比如:

    -
    import { TagToken, Context, Emitter, TopLevelToken, toPromise } from 'liquidjs'

    // Usage: {% upper "alice" %}
    // Output: ALICE
    engine.registerTag('upper', {
    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    this.str = tagToken.args; // name
    },
    render: async function(ctx: Context) {
    var str = await toPromise(this.liquid._evalValue(this.str, ctx));
    // Or use the alternate API that returns a Promise
    // var str = await this.liquid.evalValue(this.str, ctx);
    return str.toUpperCase()
    }
    });
    +
    import { TagToken, Context, Emitter, TopLevelToken, toPromise } from 'liquidjs'
    +
    +// Usage: {% upper "alice" %}
    +// Output: ALICE
    +engine.registerTag('upper', {
    +    parse: function(tagToken: TagToken, remainTokens: TopLevelToken[]) {
    +        this.str = tagToken.args; // name
    +    },
    +    render: async function(ctx: Context) {
    +        var str = await toPromise(this.liquid._evalValue(this.str, ctx));
    +        // Or use the alternate API that returns a Promise
    +        // var str = await this.liquid.evalValue(this.str, ctx);
    +        return str.toUpperCase()
    +    }
    +});

    见这个 JSFiddle:http://jsfiddle.net/ctj364up/5/

    @@ -176,7 +203,7 @@ diff --git a/zh-cn/tutorials/truthy-and-falsy.html b/zh-cn/tutorials/truthy-and-falsy.html index 23b6922c2..615fbf44a 100644 --- a/zh-cn/tutorials/truthy-and-falsy.html +++ b/zh-cn/tutorials/truthy-and-falsy.html @@ -77,7 +77,7 @@ @@ -272,7 +272,7 @@ diff --git a/zh-cn/tutorials/use-in-expressjs.html b/zh-cn/tutorials/use-in-expressjs.html index f9d83ce5c..814cd64eb 100644 --- a/zh-cn/tutorials/use-in-expressjs.html +++ b/zh-cn/tutorials/use-in-expressjs.html @@ -77,7 +77,7 @@
    @@ -92,28 +92,49 @@

    LiquidJS 可以用来作为 Express 的模板引擎。可以把 Liquid 设置到 view engine 选项上即可:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid();

    // 注册为 liquid 文件的模板引擎
    app.engine('liquid', engine.express());
    app.set('views', './views'); // 指定模板目录
    app.set('view engine', 'liquid'); // 把 liquid 文件设为默认模板
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid();
    +
    +// 注册为 liquid 文件的模板引擎
    +app.engine('liquid', engine.express()); 
    +app.set('views', './views');            // 指定模板目录
    +app.set('view engine', 'liquid');       // 把 liquid 文件设为默认模板
    示例

    这是一个在 Express.js 中使用 LiquidJS 的例子:liquidjs/demo/express/.

    模板查找

    LiquidJS 仍然会去 root 指定的目录查找(参考 Render A Template File),也会去 Express.js 的 views 选项指定的目录里(上述例子中是 ./views)去查找。例如你有这样的目录结构:

    -
    .
    ├── views1/
    │ └── hello.liquid
    └── views2/
    └── world.liquid
    +
    .
    +├── views1/
    +│ └── hello.liquid
    +└── views2/
    +  └── world.liquid

    LiquidJS 的模板 root 设置到了 views1,Express.js 的 views 设置到了 views2

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    root: './views1/'
    });

    app.engine('liquid', engine.express());
    app.set('views', './views2');
    app.set('view engine', 'liquid');
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid({
    +    root: './views1/'
    +});
    +
    +app.engine('liquid', engine.express()); 
    +app.set('views', './views2');
    +app.set('view engine', 'liquid');

    hello.liquidworld.liquid 两个文件都可以找到并且成功渲染:

    -
    res.render('hello')
    res.render('world')
    +
    res.render('hello')
    +res.render('world')

    缓存

    直接把 cache 选项 设为 true 即可开启模板缓存,参考 缓存 一文。推荐在生产环境中开启缓存,可以用如下代码:

    -
    var { Liquid } = require('liquidjs');
    var engine = new Liquid({
    cache: process.env.NODE_ENV === 'production'
    });
    +
    var { Liquid } = require('liquidjs');
    +var engine = new Liquid({
    +    cache: process.env.NODE_ENV === 'production'
    +});

    cache 还可以是一个数字表示最大缓存的模板数量,也可以是一个自定义的缓存实现,详情请参考 cache 选项

    @@ -160,7 +181,7 @@ diff --git a/zh-cn/tutorials/whitespace-control.html b/zh-cn/tutorials/whitespace-control.html index 75e5faaaa..e425ae34b 100644 --- a/zh-cn/tutorials/whitespace-control.html +++ b/zh-cn/tutorials/whitespace-control.html @@ -77,7 +77,7 @@
    @@ -93,16 +93,19 @@

    为了让源代码缩进好看,我们会加很多空白字符比如把不会产生输出的标签也单独一行。LiquidJS 提供了空白字符控制机制,可以避免这些多余的空白字符输出到 HTML 中。

    通过标记的方式

    默认所有标签和输出的行,都会在行尾产生一个换行(\n),如果有缩进的话还会产生很多前导空格。例如:

    -
    {%  author = "harttle" %}
    {{ author }}
    +
    {%  author = "harttle" %}
    +{{ author }}

    将会输出(注意前面的空行):

    -

    harttle
    +
    
    +harttle

    可以在标签和输出的标记里面加横线({{-`, `-}}`, `{%-, -%})来移除左侧/右侧的空白。例如:

    -
    {% assign author = "harttle" -%}
    {{ author }}
    +
    {% assign author = "harttle" -%}
    +{{ author }}

    将会输出:

    -
    harttle
    +
    harttle

    这个例子中 -%} 移除了 assign 标签右侧的空白。

    通过选项

    此外 LiquidJS 还提供了一系列选项来帮助扫代码式地移除空白:

    @@ -117,7 +120,7 @@
    @@ -164,7 +167,7 @@