From d999dc0a7e5238cdb6aef8f7af46ff7e9e0bec56 Mon Sep 17 00:00:00 2001 From: David Darnes Date: Sun, 23 Oct 2016 20:19:59 +0100 Subject: [PATCH 1/2] Wraps logo image json data in a publisher property Fixes #89 --- lib/template.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/template.html b/lib/template.html index 5ac1ff0..11847c9 100644 --- a/lib/template.html +++ b/lib/template.html @@ -205,7 +205,13 @@ {% endif %} {% if seo_site_logo %} - "logo": {{ seo_site_logo | jsonify }}, + "publisher": { + "@type": "Organization", + "logo": { + "@type": "ImageObject", + "url": {{ seo_site_logo | jsonify }} + } + }, {% endif %} {% if seo_links %} From f90fb32d255e97d50588c98a596f920057e11ef8 Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Sun, 23 Oct 2016 14:48:11 -0500 Subject: [PATCH 2/2] Update tests for new position of logo --- spec/jekyll_seo_tag_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 2932392..07d3a59 100644 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -184,7 +184,7 @@ describe Jekyll::SeoTag do let(:site) { make_site("logo" => "/logo.png", "url" => "http://example.invalid") } it "outputs the logo" do - expect(json_data["logo"]).to eql("http://example.invalid/logo.png") + expect(json_data["publisher"]["logo"]["url"]).to eql("http://example.invalid/logo.png") end end @@ -192,7 +192,7 @@ describe Jekyll::SeoTag do let(:site) { make_site("logo" => "http://cdn.example.invalid/logo.png", "url" => "http://example.invalid") } it "outputs the logo" do - expect(json_data["logo"]).to eql("http://cdn.example.invalid/logo.png") + expect(json_data["publisher"]["logo"]["url"]).to eql("http://cdn.example.invalid/logo.png") end end