Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Graph Image Tag for Header Overlay Images #358

Merged
merged 1 commit into from Jun 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion _includes/seo.html
Expand Up @@ -85,6 +85,8 @@

{% if page.header.image %}
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% elsif page.header.overlay_image %}
<meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/images/" | prepend: base_path }}{% endif %}">
{% endif %}

{% if page.date %}
Expand Down Expand Up @@ -113,7 +115,7 @@
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}person{% endif %}",
"@type" : "{% if site.social.type %}{{ site.social.type }}{% else %}Person{% endif %}",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually per the schema spec I believe this is suppose to be capitalized.

jekyll-seo-tag suggests the capitalized version as well.

type - The type of things that the page represents. This must be a Schema.org type, and will probably usually be something like BlogPosting, NewsArticle, Person, Organization, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the background. I noticed it should be capitalized it after seeing feedback from https://webmaster.yandex.com/microtest.xml.

"name" : "{{ site.social.name | default: site.name }}",
"url" : {{ seo_url | jsonify }},
"sameAs" : {{ site.social.links | jsonify }}
Expand Down