1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# frozen_string_literal: true
module Jekyll
class SeoTag
# This module is deprecated, but is included in the Gem to avoid a breaking
# change and should be removed at the next major version bump
module JSONLD
METHODS_KEYS = {
:json_context => "@context",
:type => "@type",
:name => "name",
:page_title => "headline",
:json_author => "author",
:json_image => "image",
:date_published => "datePublished",
:date_modified => "dateModified",
:description => "description",
:publisher => "publisher",
:main_entity => "mainEntityOfPage",
:links => "sameAs",
:canonical_url => "url",
}.freeze
# Self should be a Jekyll::SeoTag::Drop instance (when extending the module)
def json_ld
Jekyll.logger.warn "Jekyll::SeoTag::JSONLD is deprecated"
@json_ld ||= JSONLDDrop.new(self)
end
end
end
end
|