Fix site.url in Organization/Person JSON-LD schema

Close #1906
This commit is contained in:
Michael Rose
2019-08-09 09:58:39 -04:00
parent d48fe54559
commit 9ffdabb51f
3 changed files with 16 additions and 20 deletions

View File

@ -127,28 +127,21 @@
<link rel="next" href="{{ paginator.next_page_path | absolute_url }}">
{% endif %}
{% if site.og_image %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
<script type="application/ld+json">
{
"@context": "https://schema.org",
{% if site.social.type == "Organization" %}
"@type": "Organization",
"url": {{ '/' | absolute_url | jsonify }},
"logo": {{ site_og_image | jsonify }}
}
</script>
{% endif %}
{% if site.social %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "{% if site.social.type %}{{ site.social.type }}{% else %}Person{% endif %}",
"url": {{ '/' | absolute_url | jsonify }}{% if site.og_image %},
"logo": {{ site_og_image | jsonify }}{% endif %}
{% else %}
"@type": "Person",
"name": {{ site.social.name | default: site.name | jsonify }},
"url": {{ seo_url | jsonify }},
"sameAs": {{ site.social.links | jsonify }}
}
</script>
{% endif %}
"url": {{ '/' | absolute_url |jsonify }}{% if site.social.links %},
"sameAs": {{ site.social.links | jsonify }}{% endif %}
{% endif %}
}
</script>
{% if site.google_site_verification %}
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />