liquid.filters.jekyll
liquid.filters.jekyll
Provides jekyll filtersSee: https://jekyllrb.com/docs/liquid/filters/
absolute_url(env,value)— Get absolute url based on site.baseurl</>array_to_sentence_string(array,connector)(str) — Join an array of things into a string by separating with commas and theword "and" for the last one. </>cgi_escape(input)(str) — CGI escape a string for use in a URL. Replaces any special characterswith appropriate %XX replacements. </>date_to_xmlschema(env,value)— Convert date to xml schema format</>find(value,attr,query)— Find elements from array using attribute value</>find_exp(env,value,item,expr)— Find elements using expression</>group_by_expr(env,value,item,expr)— Group by data using expression</>jekyll_slugify(input,mode)(str) — Slugify a string</>jekyll_sort(array,prop,none_pos)— Sort an array in a reverse way by default.</>jsonify(input)(str) — Convert the input into json string</>markdownify(value)— Markdownify a string</>normalize_whitespace(value)— Replace multiple spaces into one</>number_of_words(input,mode)(int) — Count the number of words in the input string.</>relative_url(env,value)— Get relative url based on site.baseurl</>sample(value,n)— Sample elements from array</>uri_escape(input)(str) — URI escape a string.</>where_exp(env,value,item,expr)— Where using expression</>xml_escape(input)(str) — Convert an object into its String representation</>
liquid.filters.jekyll.relative_url(env, value)
Get relative url based on site.baseurl
liquid.filters.jekyll.absolute_url(env, value)
Get absolute url based on site.baseurl
liquid.filters.jekyll.date_to_xmlschema(env, value)
Convert date to xml schema format
liquid.filters.jekyll.where_exp(env, value, item, expr)
Where using expression
liquid.filters.jekyll.find(value, attr, query)
Find elements from array using attribute value
liquid.filters.jekyll.find_exp(env, value, item, expr)
Find elements using expression
liquid.filters.jekyll.group_by_expr(env, value, item, expr)
Group by data using expression
liquid.filters.jekyll.xml_escape(input)
Convert an object into its String representation
input(str) — The object to be converted
The converted string
liquid.filters.jekyll.cgi_escape(input)
CGI escape a string for use in a URL. Replaces any special characterswith appropriate %XX replacements.
input(str) — The string to escape
The escaped string
liquid.filters.jekyll.uri_escape(input)
URI escape a string.
input(str) — The string to escape
The escaped string
liquid.filters.jekyll.jsonify(input)
Convert the input into json string
input(any) — The Array or Hash to be converted
The converted json string
liquid.filters.jekyll.array_to_sentence_string(array, connector='and')
Join an array of things into a string by separating with commas and theword "and" for the last one.
array(sequence of str) — The Array of Strings to join.connector(str, optional) — Word used to connect the last 2 items in the array
The formatted string.
liquid.filters.jekyll.jekyll_slugify(input, mode='default')
Slugify a string
Note that non-ascii characters are always translated to ascii ones.
input(str) — The input stringmode(str, optional) — How string is slugified
The slugified string
liquid.filters.jekyll.number_of_words(input, mode=None)
Count the number of words in the input string.
input(str) — The String on which to operate.mode(str, optional) — Passing 'cjk' as the argument will count every CJK characterdetected as one word irrespective of being separated by whitespace. Passing 'auto' (auto-detect) works similar to 'cjk'
The word count.
liquid.filters.jekyll.markdownify(value)
Markdownify a string
liquid.filters.jekyll.normalize_whitespace(value)
Replace multiple spaces into one
liquid.filters.jekyll.jekyll_sort(array, prop=None, none_pos='first')
Sort an array in a reverse way by default.
Note that the order might be different than it with ruby. For example,
in python "1abc" > "1", but it's not the case in jekyll. Also, it's
always in reverse order for property values.
array— The arrayprop(str, optional) — property namenone_pos(str, optional) — None order (first or last).
The sorted array
liquid.filters.jekyll.sample(value, n=1)
Sample elements from array