Module | Jekyll::Filters |
In: |
lib/jekyll/filters.rb
|
Join an array of things into a string by separating with commes and the word "and" for the last one.
array - The Array of Strings to join.
Examples
array_to_sentence_string(["apples", "oranges", "grapes"]) # => "apples, oranges, and grapes"
Returns the formatted String.
CGI escape a string for use in a URL. Replaces any special characters with appropriate %XX replacements.
input - The String to escape.
Examples
cgi_escape('foo,bar;baz?') # => "foo%2Cbar%3Bbaz%3F"
Returns the escaped String.
Format a date in long format e.g. "27 January 2011".
date - The Time to format.
Returns the formatted String.
Format a date in short format e.g. "27 Jan 2011".
date - the Time to format.
Returns the formatting String.
Format a date for use in XML.
date - The Time to format.
Examples
date_to_xmlschema(Time.now) # => "2011-04-24T20:34:46+08:00"
Returns the formatted String.
Convert a Markdown string into HTML output.
input - The Markdown String to convert.
Returns the HTML formatted String.
Count the number of words in the input string.
input - The String on which to operate.
Returns the Integer word count.