Tags and Filters available in Jekyll 3.10.0 -
Test count - Passed - Failed
Here is a list of available Tags and Filters in Jekyll.
This is a work in progress, feel free to contribute via github repository.
jekyll
- filters:array:array_to_sentence_string
- filters:array:push
- filters:array:pop
- filters:array:shift
- filters:array:unshift
- filters:enumerable:where
- filters:enumerable:group_by
- filters:enumerable:jsonify
- filters:enumerable:sort
- filters:string:number_of_words
- filters:string:markdownify
- filters:date:date_to_xmlschema
- filters:date:date_to_rfc822
- filters:date:date_to_string
- filters:date:date_to_long_string
- tags:theme:include
- tags:theme:include_relative
liquid
- basics:operators:contains
- basics:types:array
- tags:control-flow:if
- tags:control-flow:elsif-else
- tags:control-flow:case-when
- tags:control-flow:unless
- tags:theme:comment
- objects:forloop:forloop.first
- objects:forloop:forloop.index
- objects:forloop:forloop.index0
- objects:forloop:forloop.last
- objects:forloop:forloop.rindex
- objects:forloop:forloop.rindex0
- objects:forloop:forloop.length
- filters:array:join
- filters:array:first
- filters:array:last
- filters:array:map
- filters:array:size
- filters:array:sort
- filters:math:ceil
- filters:math:divided_by
- filters:math:floor
- filters:math:minus
- filters:math:plus
- filters:math:round
- filters:math:times
- filters:math:modulo
- filters:string:append
- filters:string:capitalize
- filters:string:downcase
- filters:string:escape
- filters:string:newline_to_br
- filters:string:prepend
- filters:string:remove
- filters:string:remove_first
- filters:string:replace
- filters:string:replace_first
- filters:string:slice
- filters:string:split
- filters:string:strip
- filters:string:lstrip
- filters:string:rstrip
- filters:string:strip_html
- filters:string:strip_newlines
- filters:string:truncate
- filters:string:truncatewords
- filters:string:upcase
kramdown
- config:gfm:multiple-underscores-in-words
- config:gfm:url-autolinking
- config:gfm:strikethrough
- config:gfm:fenced-code-blocks
- config:gfm:syntax-highlighting
Tests results
jekyll
jekyll:array:array_to_sentence_string Test #1 jekyll Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array | array_to_sentence_string }}
- Expected
- one, two, and three
- Result
- one, two, and three
jekyll:array:push Test #1 Back to top
{% assign my_array = "one|two" | split: "|" %}{{ my_array | push: "three" }}
- Expected
- onetwothree
- Result
- onetwothree
- Comment
- Jekyll 2.4 specific
jekyll:array:pop Test #1 Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array | pop }}
- Expected
- three
- Result
- onetwo
- Comment
- Jekyll 2.4 specific
jekyll:array:pop Test #2 Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array | pop: 2 }}
- Expected
- twothree
- Result
- one
- Comment
- Jekyll 2.4 specific
jekyll:array:shift Test #1 Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array | shift }}
- Expected
- one
- Result
- twothree
- Comment
- Jekyll 2.4 specific
jekyll:array:shift Test #2 Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array | shift: 2 }}
- Expected
- onetwo
- Result
- three
- Comment
- Jekyll 2.4 specific
jekyll:array:unshift Test #1 Back to top
{% assign my_array = "one|two" | split: "|" %}{{ my_array | unshift: "three" }}
- Expected
- threeonetwo
- Result
- threeonetwo
- Comment
- Jekyll 2.4 specific
jekyll:enumerable:where Test #1 jekyll Documentation - Back to top
{% capture post %}{{ site.data.test-datas.posts | where:"weight", 10 }}{% endcapture %}{{ post }}
- Expected
- {"title"=>"a", "content"=>"a title body", "weight"=>10, "group"=>"titi"}
- Result
- {"title"=>"a", "content"=>"a title body", "weight"=>10, "group"=>"titi"}
- Comment
- this filter need better testing
jekyll:enumerable:group_by Test #1 Back to top
{% assign groups = site.data.test-datas.posts | group_by: "group" %} {% for group in groups %}{{ group.name }}{% for item in group.items %}{{item.title}}{%endfor%}{%endfor%}
- Expected
- totoABtitiab
- Result
- totoABtitiab
- nl2space
- true
- Comment
- this filter need better testing
jekyll:enumerable:jsonify Test #1 jekyll Documentation - Back to top
{{ site.data.test-datas.posts[0] | jsonify }}
- Expected
- {"title":"A","content":"A title body","weight":30,"group":"toto"}
- Result
- {"title":"A","content":"A title body","weight":30,"group":"toto"}
jekyll:enumerable:sort Test #1 jekyll Documentation - Back to top
{% assign posts = site.data.test-datas.posts | sort: "weight" %}{% for post in posts %}{{ post.title }}{% endfor %}
- Expected
- baBA
- Result
- baBA
jekyll:enumerable:sort Test #2 jekyll Documentation - Back to top
{% assign posts = site.data.test-datas.posts | sort: "weight", "last" %}{% for post in posts %}{{ post.title }}{% endfor %}
- Expected
- aBAb
- Result
- aBAb
jekyll:enumerable:sort Test #3 jekyll Documentation - Back to top
{% assign posts = site.data.test-datas.posts | sort: "weight", "first" %}{% for post in posts %}{{ post.title }}{% endfor %}
- Expected
- baBA
- Result
- baBA
jekyll:string:number_of_words Test #1 jekyll Documentation - Back to top
{{ "three word sentence" | number_of_words }}
- Expected
- 3
- Result
- 3
jekyll:string:markdownify Test #1 jekyll Documentation - Back to top
{{ "**strong** and *em*" | markdownify | escape }}
- Expected
- <p><strong>strong</strong> and <em>em</em></p>
- Result
- <p><strong>strong</strong> and <em>em</em></p>
- nl2space
- true
- Comment
- this test is passing. problem in the expected tag that adds a newline
jekyll:date:date_to_xmlschema Test #1 jekyll Documentation - Back to top
{{ "Fri, 07 Nov 2008 00:00:00 +0100" | date_to_xmlschema }}
- Expected
- 2008-11-07T00:00:00+01:00
- Result
- 2008-11-06T23:00:00+00:00
jekyll:date:date_to_rfc822 Test #1 jekyll Documentation - Back to top
{{ "2008-11-07T00:00:00+01:00" | date_to_rfc822 }}
- Expected
- Fri, 07 Nov 2008 00:00:00 +0100
- Result
- Thu, 06 Nov 2008 23:00:00 +0000
jekyll:date:date_to_string Test #1 jekyll Documentation - Back to top
{{ "Fri, 07 Nov 2008 00:00:00 +0100" | date_to_string }}
- Expected
- 07 Nov 2008
- Result
- 06 Nov 2008
jekyll:date:date_to_long_string Test #1 jekyll Documentation - Back to top
{{ "Fri, 07 Nov 2008 00:00:00 +0100" | date_to_long_string }}
- Expected
- 07 November 2008
- Result
- 06 November 2008
jekyll:theme:include Test #1 jekyll Documentation - Back to top
{% include test_en.html %}
- Description
- simple include
- Expected
- english include
- Result
- english include
- nl2space
- true
jekyll:theme:include Test #2 jekyll Documentation - Back to top
{% assign tpl = "test_en.html" %}{% include {{ tpl }} %}
- Description
- include with file name in a variable
- Expected
- english include
- Result
- english include
- nl2space
- true
jekyll:theme:include Test #3 jekyll Documentation - Back to top
{% assign lang = "en" %}{% capture filename %}test_{{ lang }}.html{% endcapture %}{% include {{filename}} %}
- Description
- include with "dynamic" file name concatenation
- Expected
- english include
- Result
- english include
- nl2space
- true
jekyll:theme:include Test #4 jekyll Documentation - Back to top
{% assign lang = "en" %}{% include test_{{ lang }}.html %}
- Description
- include with "dynamic" file name concatenation in include tag
- Expected
- english include
- Result
- this test throw an exception on current Jekyll version
- nl2space
- true
- Comment
- Jekyll 2.3 - Only one variable tag is allowed in the include tag.
jekyll:theme:include Test #5 jekyll Documentation - Back to top
{% assign name = "titi" %}{% include test_include.html %}
- Description
- include calling variable defined in parent template
- Expected
- titi
- Result
- titi
- nl2space
- true
jekyll:theme:include_relative Test #1 jekyll Documentation - Back to top
{% include_relative _includes/test_en.html %}
- Description
- simple include_relative
- Expected
- english include
- Result
- english include
- nl2space
- true
jekyll:theme:include_relative Test #2 jekyll Documentation - Back to top
{% assign tpl = "_includes/test_en.html" %}{% include_relative {{ tpl }} %}
- Description
- include_relative with file name in a variable
- Expected
- english include
- Result
- english include
- nl2space
- true
jekyll:theme:include_relative Test #3 jekyll Documentation - Back to top
{% assign lang = "en" %}{% capture filename %}_includes/test_{{ lang }}.html{% endcapture %}{% include_relative {{filename}} %}
- Description
- include_relative with "dynamic" file name concatenation
- Expected
- english include
- Result
- english include
- nl2space
- true
jekyll:theme:include_relative Test #4 jekyll Documentation - Back to top
{% assign lang = "en" %}{% include_relative _includes/test_{{ lang }}.html %}
- Description
- include_relative with "dynamic" file name concatenation in include tag
- Expected
- english include
- Result
- this test throw an exception on current Jekyll version
- nl2space
- true
- Comment
- Jekyll 2.3 - Only one variable tag is allowed in the include tag.
jekyll:theme:include_relative Test #5 jekyll Documentation - Back to top
{% assign name = "titi" %}{% include_relative _includes/test_include.html %}
- Description
- include_relative calling variable defined in parent template
- Expected
- titi
- Result
- titi
- nl2space
- true
liquid
liquid:operators:contains Test #1 liquid Documentation - Back to top
{% if "Hello world !" contains "Hello" %}contains{% else %}not found{% endif %}
- Expected
- contains
- Result
- contains
liquid:operators:contains Test #2 liquid Documentation - Back to top
{% if "Hello world !" contains "Jelyll" %}contains{% else %}not found{% endif %}
- Expected
- not found
- Result
- not found
liquid:operators:contains Test #3 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{% if my_array contains "one" %}contains{% else %}not found{% endif %}
- Expected
- contains
- Result
- contains
liquid:operators:contains Test #4 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{% if my_array contains "four" %}contains{% else %}not found{% endif %}
- Expected
- not found
- Result
- not found
liquid:types:array Test #1 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{% for num in my_array %}{{ num }}{% endfor %}
- Expected
- onetwothree
- Result
- onetwothree
liquid:types:array Test #2 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array[0] }}{{ my_array[1] }}{{ my_array[2] }}
- Expected
- onetwothree
- Result
- onetwothree
liquid:control-flow:if Test #1 liquid Documentation - Back to top
{% if 1 == 1 %}OK{% endif %}
- Expected
- OK
- Result
- OK
liquid:control-flow:if Test #2 liquid Documentation - Back to top
{% if 1 == "1" %}OK{% endif %}
- Expected
- Result
liquid:control-flow:elsif-else Test #1 liquid Documentation - Back to top
{% assign name="toto" %}{% if name == "toto" %}toto{% elsif name == "titi" %}titi{% else %}nobody{% endif %}
- Expected
- toto
- Result
- toto
liquid:control-flow:elsif-else Test #2 liquid Documentation - Back to top
{% assign name="titi" %}{% if name == "toto" %}toto{% elsif name == "titi" %}titi{% else %}nobody{% endif %}
- Expected
- titi
- Result
- titi
liquid:control-flow:elsif-else Test #3 liquid Documentation - Back to top
{% assign name="yoyo" %}{% if name == "toto" %}toto{% elsif name == "titi" %}titi{% else %}nobody{% endif %}
- Expected
- nobody
- Result
- nobody
liquid:control-flow:case-when Test #1 liquid Documentation - Back to top
{% assign handle = 'cake' %}{% case handle %}{% when 'cake' %}This is a cake{% when 'cookie' %}This is a cookie{% else %}This is not a cake nor a cookie{% endcase %}
- Expected
- This is a cake
- Result
- This is a cake
liquid:control-flow:case-when Test #2 liquid Documentation - Back to top
{% assign handle = 'cookie' %}{% case handle %}{% when 'cake' %}This is a cake{% when 'cookie' %}This is a cookie{% else %}This is not a cake nor a cookie{% endcase %}
- Expected
- This is a cookie
- Result
- This is a cookie
liquid:control-flow:case-when Test #3 liquid Documentation - Back to top
{% assign handle = 'bacon' %}{% case handle %}{% when 'cake' %}This is a cake{% when 'cookie' %}This is a cookie{% else %}This is not a cake nor a cookie{% endcase %}
- Expected
- This is not a cake nor a cookie
- Result
- This is not a cake nor a cookie
liquid:control-flow:unless Test #1 liquid Documentation - Back to top
{% assign name='toto' %}{% unless name == 'titi' %}Not {% endunless %}titi
- Expected
- Not titi
- Result
- Not titi
liquid:control-flow:unless Test #2 liquid Documentation - Back to top
{% assign name='titi' %}{% unless name == 'titi' %}Not{% endunless %}titi
- Expected
- titi
- Result
- titi
liquid:theme:comment Test #1 liquid Documentation - Back to top
My name is {% comment %}NOT{% endcomment %}Titi.
- Expected
- My name is Titi.
- Result
- My name is Titi.
liquid:forloop:forloop.first Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{% if forloop.first == true %}{{ num }}{% else %}-{% endif %}{% endfor %}
- Expected
- one--
- Result
- one--
liquid:forloop:forloop.index Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{{ forloop.index }}{% endfor %}
- Expected
- 123
- Result
- 123
liquid:forloop:forloop.index0 Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{{ forloop.index0 }}{% endfor %}
- Expected
- 012
- Result
- 012
liquid:forloop:forloop.last Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{% if forloop.last == true %}{{ num }}{% else %}-{% endif %}{% endfor %}
- Expected
- --three
- Result
- --three
liquid:forloop:forloop.rindex Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{{ forloop.rindex }}{% endfor %}
- Expected
- 321
- Result
- 321
liquid:forloop:forloop.rindex0 Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{{ forloop.rindex0 }}{% endfor %}
- Expected
- 210
- Result
- 210
liquid:forloop:forloop.length Test #1 liquid Documentation - Back to top
{% for num in site.data.test-datas.multi-dim-array.arrayone %}{% capture length %}{{ forloop.length }}{% endcapture %}{% endfor %}{{ length }}
- Expected
- 3
- Result
- 3
liquid:array:join Test #1 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" | join: ", " %}{{ my_array }}
- Expected
- one, two, three
- Result
- one, two, three
liquid:array:first Test #1 liquid Documentation - Back to top
{{ "one|two|three" | split: "|" | first }}
- Expected
- one
- Result
- one
liquid:array:first Test #2 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array.first }}
- Expected
- one
- Result
- one
- Comment
- first can be used in dot notation, in cases where it needs to be used inside a tag.
liquid:array:last Test #1 liquid Documentation - Back to top
{{ "one|two|three" | split: "|" | last }}
- Expected
- three
- Result
- three
liquid:array:last Test #2 liquid Documentation - Back to top
{% assign my_array = "one|two|three" | split: "|" %}{{ my_array.last }}
- Expected
- three
- Result
- three
- Comment
- last can be used in dot notation, in cases where it needs to be used inside a tag.
liquid:array:map Test #1 liquid Documentation - Back to top
{% assign mapping = site.data.test-datas.multi-dim-array | map: "arrayone" %}{{ mapping }}
- Expected
- onetwothree
- Result
- onetwothree
liquid:array:size Test #1 liquid Documentation - Back to top
{{ "this is a 30 character string!" | size }}
- Expected
- 30
- Result
- 30
liquid:array:size Test #2 liquid Documentation - Back to top
{{ "one|two|three" | split: "|" | size }}
- Expected
- 3
- Result
- 3
liquid:array:sort Test #1 liquid Documentation - Back to top
{% assign posts = site.data.test-datas.posts | sort: "weight" %}{% for post in posts %}{{ post.weight }}{% endfor %}
- Expected
- 102030
- Result
- 102030
- Comment
- this filter is overriden by Jekyll sort
liquid:array:sort Test #2 liquid Documentation - Back to top
{% assign posts = site.data.test-datas.posts | sort: "title" %}{% for post in posts %}{{ post.title }}{% endfor %}
- Expected
- ABab
- Result
- ABab
- Comment
- this filter is overriden by Jekyll sort
liquid:math:ceil Test #1 liquid Documentation - Back to top
{{ 4.6 | ceil }}
- Expected
- 5
- Result
- 5
- Comment
- liquid 3.0
liquid:math:divided_by Test #1 liquid Documentation - Back to top
{{ 6 | divided_by: 3 }}
- Expected
- 2
- Result
- 2
liquid:math:divided_by Test #2 liquid Documentation - Back to top
{{ 3 | divided_by: 5 }}
- Expected
- 0
- Result
- 0
- Comment
- integers division returns integer
liquid:math:divided_by Test #3 liquid Documentation - Back to top
{{ "3" | divided_by: 5 }}
- Expected
- 0
- Result
- 0
- Comment
- integers division returns integer
liquid:math:divided_by Test #4 liquid Documentation - Back to top
{{ "3.0" | divided_by: 5 }}
- Expected
- 0.6
- Result
- 0.6
liquid:math:divided_by Test #5 liquid Documentation - Back to top
{{ 3.0 | divided_by: 5 }}
- Expected
- 0.6
- Result
- 0.6
liquid:math:divided_by Test #6 liquid Documentation - Back to top
{{ "3" | divided_by: 5.0 }}
- Expected
- 0.6
- Result
- 0.6
liquid:math:divided_by Test #7 liquid Documentation - Back to top
{{ 3 | divided_by: "5.0" }}
- Expected
- 0.6
- Result
- 0.6
liquid:math:floor Test #1 liquid Documentation - Back to top
{{ 4.6 | floor }}
- Expected
- 4
- Result
- 4
- Comment
- liquid 3.0
liquid:math:minus Test #1 liquid Documentation - Back to top
{{ 16 | minus: 15 }}
- Expected
- 1
- Result
- 1
liquid:math:minus Test #2 liquid Documentation - Back to top
{{ "16" | minus: 15 }}
- Expected
- 1
- Result
- 1
liquid:math:minus Test #3 liquid Documentation - Back to top
{{ 16 | minus: "15" }}
- Expected
- 1
- Result
- 1
liquid:math:minus Test #4 liquid Documentation - Back to top
{{ 1 | minus: 0.5 }}
- Expected
- 0.5
- Result
- 0.5
liquid:math:minus Test #5 liquid Documentation - Back to top
{{ 1 | minus: "0.5" }}
- Expected
- 0.5
- Result
- 0.5
liquid:math:minus Test #6 liquid Documentation - Back to top
{{ "1" | minus: 0.5 }}
- Expected
- 0.5
- Result
- 0.5
liquid:math:plus Test #1 liquid Documentation - Back to top
{{ 16 | plus: 15 }}
- Expected
- 31
- Result
- 31
liquid:math:plus Test #2 liquid Documentation - Back to top
{{ "16" | plus: 15 }}
- Expected
- 31
- Result
- 31
liquid:math:plus Test #3 liquid Documentation - Back to top
{{ 16 | plus: "15" }}
- Expected
- 31
- Result
- 31
liquid:math:plus Test #4 liquid Documentation - Back to top
{{ 1.6 | plus: 1.5 }}
- Expected
- 3.1
- Result
- 3.1
liquid:math:plus Test #5 liquid Documentation - Back to top
{{ "1.6" | plus: 1.5 }}
- Expected
- 3.1
- Result
- 3.1
liquid:math:plus Test #6 liquid Documentation - Back to top
{{ 1.6 | plus: "1.5" }}
- Expected
- 3.1
- Result
- 3.1
liquid:math:round Test #1 liquid Documentation - Back to top
{{ 4.6 | round }}
- Expected
- 5
- Result
- 5
- Comment
- liquid 3.0
liquid:math:round Test #2 liquid Documentation - Back to top
{{ 4.3 | round }}
- Expected
- 4
- Result
- 4
- Comment
- liquid 3.0
liquid:math:round Test #3 liquid Documentation - Back to top
{{ 4.5612 | round: 2 }}
- Expected
- 456
- Result
- 4.56
- Comment
- liquid 3.0
liquid:math:times Test #1 liquid Documentation - Back to top
{{ 100 | times: 2 }}
- Expected
- 200
- Result
- 200
liquid:math:times Test #2 liquid Documentation - Back to top
{{ 10.12 | times: 10 }}
- Expected
- 101.2
- Result
- 101.2
liquid:math:times Test #3 liquid Documentation - Back to top
{{ 10 | times: 10.12 }}
- Expected
- 101.2
- Result
- 101.2
liquid:math:modulo Test #1 liquid Documentation - Back to top
{{ 12 | modulo: 5 }}
- Expected
- 2
- Result
- 2
liquid:math:modulo Test #2 liquid Documentation - Back to top
{{ "12" | modulo: 5 }}
- Expected
- 2
- Result
- 2
liquid:math:modulo Test #3 liquid Documentation - Back to top
{{ 12 | modulo: "5" }}
- Expected
- 2
- Result
- 2
liquid:math:modulo Test #4 liquid Documentation - Back to top
{{ 1.2 | modulo: 5 }}
- Expected
- 1.2
- Result
- 1.2
liquid:math:modulo Test #5 liquid Documentation - Back to top
{{ 15.5 | modulo: 5.1 }}
- Expected
- 0.2
- Result
- 0.2
liquid:string:append Test #1 liquid Documentation - Back to top
{{ 'sales' | append: '.jpg' }}
- Expected
- sales.jpg
- Result
- sales.jpg
liquid:string:capitalize Test #1 liquid Documentation - Back to top
{{ 'capitalize me' | capitalize }}
- Expected
- Capitalize me
- Result
- Capitalize me
liquid:string:downcase Test #1 liquid Documentation - Back to top
{{ 'UPPERCASE' | downcase }}
- Expected
- uppercase
- Result
- uppercase
liquid:string:escape Test #1 liquid Documentation - Back to top
{{ "<p>test</p>" | escape }}
- Expected
- <p>test</p>
- Result
- <p>test</p>
liquid:string:newline_to_br Test #1 liquid Documentation - Back to top
{{ site.data.test-datas.string-with-newlines | newline_to_br | escape }}
- Expected
- One<br /> Two<br /> Three<br />
- Result
- One<br /> Two<br /> Three<br />
liquid:string:prepend Test #1 liquid Documentation - Back to top
{{ 'sale' | prepend: 'Made a great ' }}
- Expected
- Made a great sale
- Result
- Made a great sale
liquid:string:remove Test #1 liquid Documentation - Back to top
{{ "Hello, world. Goodbye, world." | remove: "world" }}
- Expected
- Hello, . Goodbye, .
- Result
- Hello, . Goodbye, .
liquid:string:remove_first Test #1 liquid Documentation - Back to top
{{ "Hello, world. Goodbye, world." | remove_first: "world" }}
- Expected
- Hello, . Goodbye, world.
- Result
- Hello, . Goodbye, world.
liquid:string:replace Test #1 liquid Documentation - Back to top
{{ 'Hello World !' | replace: 'World', 'Jekyll' }}
- Expected
- Hello Jekyll !
- Result
- Hello Jekyll !
liquid:string:replace_first Test #1 liquid Documentation - Back to top
{{ 'Awesome Awesome Shoes' | replace_first: 'Awesome', 'Mega' }}
- Expected
- Mega Awesome Shoes
- Result
- Mega Awesome Shoes
liquid:string:slice Test #1 liquid Documentation - Back to top
{{ "hello" | slice: 2 }}
- Expected
- e
- Result
- l
- Comment
- liquid 3.0
liquid:string:slice Test #2 liquid Documentation - Back to top
{{ "hello" | slice: 1, 3 }}
- Expected
- ell
- Result
- ell
- Comment
- liquid 3.0
liquid:string:slice Test #3 liquid Documentation - Back to top
{{ "hello" | slice: -3, 2 }}
- Expected
- el
- Result
- ll
- Comment
- liquid 3.0
liquid:string:split Test #1 liquid Documentation - Back to top
{% assign words = "Uses cheat codes, calls the game boring." | split: " " %}{% for word in words %}{{ word }}{% endfor %}
- Expected
- Usescheatcodes,callsthegameboring.
- Result
- Usescheatcodes,callsthegameboring.
liquid:string:strip Test #1 liquid Documentation - Back to top
|{{' too many spaces '|strip}}|
- Expected
- |too many spaces|
- Result
- |too many spaces|
- Comment
- liquid 3.0
liquid:string:lstrip Test #1 liquid Documentation - Back to top
|{{ ' too many spaces ' | lstrip }}|
- Expected
- |too many spaces |
- Result
- |too many spaces |
- Comment
- liquid 3.0
liquid:string:rstrip Test #1 liquid Documentation - Back to top
|{{ ' too many spaces ' | rstrip }}|
- Expected
- | too many spaces|
- Result
- | too many spaces|
- Comment
- liquid 3.0
liquid:string:strip_html Test #1 liquid Documentation - Back to top
{{ "<h1>Hello</h1> World" | strip_html }}
- Expected
- Hello World
- Result
- Hello World
liquid:string:strip_newlines Test #1 liquid Documentation - Back to top
{{ site.data.test-datas.string-with-newlines | strip_newlines }}
- Expected
- OneTwoThree
- Result
- OneTwoThree
liquid:string:truncate Test #1 liquid Documentation - Back to top
{{ "The cat came back the very next day" | truncate: 10 }}
- Expected
- The cat...
- Result
- The cat...
liquid:string:truncatewords Test #1 liquid Documentation - Back to top
{{ "The cat came back the very next day" | truncatewords: 4 }}
- Expected
- The cat came back...
- Result
- The cat came back...
liquid:string:upcase Test #1 liquid Documentation - Back to top
{{ 'i want this to be uppercase' | upcase }}
- Expected
- I WANT THIS TO BE UPPERCASE
- Result
- I WANT THIS TO BE UPPERCASE
kramdown
kramdown:gfm:multiple-underscores-in-words Test #1 kramdown Documentation - Back to top
{{ "perform_complicated_task" | markdownify }}
- Expected
perform_complicated_task
- Result
perform_complicated_task
- Comment
- Multiple underscores in words
kramdown:gfm:url-autolinking Test #1 kramdown Documentation - Back to top
{{ "http://example.com" | markdownify }}
- Expected
- Result
http://example.com
- Comment
- URL autolinking
kramdown:gfm:strikethrough Test #1 kramdown Documentation - Back to top
{{ "~~Mistaken text.~~" | markdownify }}
- Expected
- <del>Mistaken text.</del>
- Result
Mistaken text.- Comment
- Strikethrough
kramdown:gfm:fenced-code-blocks Test #1 kramdown Documentation - Back to top
{% capture tag %} ``` function test() {
console.log("toto");
} ``` {% endcapture %} {{ tag | markdownify }}
- Expected
function test() { console.log("toto"); }
- Result
-
function test() { console.log("toto"); }
- nl2space
- true
- Comment
- Fenced code blocks
kramdown:gfm:syntax-highlighting Test #1 kramdown Documentation - Back to top
{% capture tag %}
```ruby
def start
puts "toto"
end
```
{% endcapture %}
{{ tag | markdownify }}
- Expected
def start puts "toto" end
- Result
-
def start puts "toto" end
- nl2space
- true
- Comment
- Syntax highlighting