Skip to content

Commit

Permalink
Fix site.url in Organization/Person JSON-LD schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Aug 9, 2019
1 parent e0d4a2c commit 44126f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

### 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)
- 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)
Expand Down
33 changes: 13 additions & 20 deletions _includes/seo.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}" />
Expand Down
2 changes: 2 additions & 0 deletions test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ social:
type : # Person or Organization (defaults to Person)
name : # If the user or organization name differs from the site's name
links: # An array of links to social media profiles
- https://twitter.com/
- https://github.com/

# Analytics
analytics:
Expand Down

0 comments on commit 44126f3

Please sign in to comment.