mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
support jsonify filter
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
require 'uri'
|
||||
require 'json'
|
||||
|
||||
module Jekyll
|
||||
module Filters
|
||||
@@ -148,6 +149,15 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
# Convert the input into json string
|
||||
#
|
||||
# input - The Array or Hash to be converted
|
||||
#
|
||||
# Returns the converted json string
|
||||
def jsonify(input)
|
||||
input.to_json
|
||||
end
|
||||
|
||||
private
|
||||
def time(input)
|
||||
case input
|
||||
|
||||
Reference in New Issue
Block a user