Template payload should be a UnifiedPayloadDrop, not a hash

This commit is contained in:
Ben Balter 2017-09-06 12:16:10 -04:00
parent d230d6d885
commit 3805012e9a
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
3 changed files with 4 additions and 8 deletions

View File

@ -44,12 +44,12 @@ module Jekyll
end
def payload
{
# site_payload is an instance of UnifiedPayloadDrop. See https://git.io/v5ajm
@payload ||= context.registers[:site].site_payload.merge({
"page" => context.registers[:page],
"site" => context.registers[:site].site_payload["site"],
"paginator" => context["paginator"],
"seo_tag" => drop,
}
})
end
def drop

View File

@ -20,10 +20,6 @@ module Jekyll
Jekyll::SeoTag::VERSION
end
def jekyll_version
Jekyll::VERSION
end
# Should the `<title>` tag be generated for this page?
def title?
return false unless title

View File

@ -3,7 +3,7 @@
<title>{{ seo_tag.title }}</title>
{% endif %}
<meta name="generator" content="Jekyll v{{ seo_tag.jekyll_version }}" />
<meta name="generator" content="Jekyll v{{ jekyll.version }}" />
{% if seo_tag.page_title %}
<meta property="og:title" content="{{ seo_tag.page_title }}" />