Module: SolidusSeo::Jsonld::TagHelper
- Defined in:
- lib/solidus_seo/jsonld/tag_helper.rb
Instance Method Summary collapse
- #captured_jsonld ⇒ Object
- #dump_jsonld ⇒ Object
-
#jsonld(item, opts = {}) ⇒ String
Retrieves jsonld tag markup.
- #jsonld_breadcrumbs(breadcrumbs) ⇒ Object
- #jsonld_list(collection) ⇒ Object
Instance Method Details
#captured_jsonld ⇒ Object
26 27 28 29 |
# File 'lib/solidus_seo/jsonld/tag_helper.rb', line 26 def captured_jsonld @captured_jsonld ||= {} @captured_jsonld.values.join("\n").html_safe end |
#dump_jsonld ⇒ Object
31 32 33 |
# File 'lib/solidus_seo/jsonld/tag_helper.rb', line 31 def dump_jsonld captured_jsonld + jsonld(current_store) end |
#jsonld(item, opts = {}) ⇒ String
Returns Retrieves jsonld tag markup.
14 15 16 |
# File 'lib/solidus_seo/jsonld/tag_helper.rb', line 14 def jsonld(item, opts = {}) jsonld_fetch(:base, item, opts.symbolize_keys) end |
#jsonld_breadcrumbs(breadcrumbs) ⇒ Object
22 23 24 |
# File 'lib/solidus_seo/jsonld/tag_helper.rb', line 22 def () jsonld_fetch(:breadcrumbs, ) end |
#jsonld_list(collection) ⇒ Object
18 19 20 |
# File 'lib/solidus_seo/jsonld/tag_helper.rb', line 18 def jsonld_list(collection) capture_jsonld(:list, jsonld_fetch(:list, collection)) end |