add json_ld back to JSONLD to avoid a breaking change

This commit is contained in:
Ben Balter 2017-08-24 13:01:43 -04:00
parent 3ef2f613e9
commit 83d420113c
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,8 @@
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
# Unused, but here to preserve backwards compatability
METHODS_KEYS = {
:json_context => "@context",
:type => "@type",
@ -17,6 +18,12 @@ module Jekyll
: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