From f82ea47534a1e1a2a8af2bc66df2110913f9e74d Mon Sep 17 00:00:00 2001 From: Kyle Niewiada Date: Mon, 16 Jan 2017 17:18:50 -0500 Subject: [PATCH] Fix Google Structured Data Requests Fixes missing author and name in blogPosting types with organization. --- lib/template.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/template.html b/lib/template.html index 1c9f3ea..c1b1fcf 100644 --- a/lib/template.html +++ b/lib/template.html @@ -62,6 +62,9 @@ {% endif %} {% endif %} {% assign seo_author_twitter = seo_author_twitter | replace:"@","" %} + {% if seo_author.name %} + {% assign seo_author_name = seo_author.name %} + {% else %} {% endif %} {% if page.seo and page.seo.type %} @@ -206,6 +209,10 @@ "headline": {{ seo_page_title | jsonify }}, {% endif %} +{% if seo_author_name %} + "author": {{ seo_author_name | jsonify }}, +{% endif %} + {% if seo_page_image %} "image": {{ seo_page_image | jsonify }}, {% endif %} @@ -221,6 +228,9 @@ {% if seo_site_logo %} "publisher": { "@type": "Organization", + {% if seo_author_name %} + "Name": {{ seo_author_name | jsonify }}, + {% endif %} "logo": { "@type": "ImageObject", "url": {{ seo_site_logo | jsonify }}