Module: Jekyll::JSON::LD::JSONLDFilter

Defined in:
lib/jekyll/json/ld.rb

Overview

Provides the filter json_ld that renders

a provided YAML to JSON-LD

Returns:

  • (String)

    object in json-ld wrapped in the script tag of type “application/ld+json”

Instance Method Summary collapse

Instance Method Details

#json_ld_filter(yaml) ⇒ Object



12
13
14
# File 'lib/jekyll/json/ld.rb', line 12

def json_ld_filter(yaml)
  "<script type=\"application/ld+json\">%s</script>" % yaml.to_json
end