~xdavidwu/xdavidwu.link

0042e585e462bb4df7c5a167682a1842bd5365c6 — Michael Rose 4 years ago 8bed6b7
Fix `site.url` in Organization/Person JSON-LD schema

Close #1906
2 files changed, 14 insertions(+), 20 deletions(-)

M CHANGELOG.md
M _includes/seo.html
M CHANGELOG.md => CHANGELOG.md +1 -0
@@ 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)

M _includes/seo.html => _includes/seo.html +13 -20
@@ 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 }}" />