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

@ -7,6 +7,7 @@
### Bug Fixes ### Bug Fixes
- Fix `site.url` in Organization/Person JSON-LD schema. [#1906](https://github.com/mmistakes/minimal-mistakes/issues/1906)
- Remove full stop in some `comment_form_info` UI text strings. [#2220](https://github.com/mmistakes/minimal-mistakes/pull/2220) - Remove full stop in some `comment_form_info` UI text strings. [#2220](https://github.com/mmistakes/minimal-mistakes/pull/2220)
- Fix default `site.author` in seo.html [#2230](https://github.com/mmistakes/minimal-mistakes/pull/2230) - Fix default `site.author` in seo.html [#2230](https://github.com/mmistakes/minimal-mistakes/pull/2230)
- Fix overlapping links (linked to and post's permalink) in post link type. [#2222](https://github.com/mmistakes/minimal-mistakes/issues/2222) - Fix overlapping links (linked to and post's permalink) in post link type. [#2222](https://github.com/mmistakes/minimal-mistakes/issues/2222)

View file

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

View file

@ -84,6 +84,8 @@ social:
type : # Person or Organization (defaults to Person) type : # Person or Organization (defaults to Person)
name : # If the user or organization name differs from the site's name name : # If the user or organization name differs from the site's name
links: # An array of links to social media profiles links: # An array of links to social media profiles
- https://twitter.com/
- https://github.com/
# Analytics # Analytics
analytics: analytics: