-
-
Save lukebussey/b0805f8bb17df95aa3f2815a018df12c to your computer and use it in GitHub Desktop.
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "Organization", | |
"@id": "#organization", | |
"name": "Outlyer", | |
"url": "https://www.outlyer.com/", | |
"sameAs": [ | |
"https://github.com/outlyerapp", | |
"https://twitter.com/outlyer", | |
"https://www.facebook.com/outlyerapp", | |
"https://plus.google.com/+outlyer", | |
"https://www.youtube.com/outlyer", | |
"https://www.linkedin.com/company/outlyer", | |
"https://www.wikidata.org/wiki/Q29790564" | |
] | |
} | |
</script> | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "Blog", | |
"@id": "#blog", | |
"name": "Outlyer", | |
"description": "{{ group.description }}", | |
"url": "{{ group.absolute_url }}", | |
"publisher": { | |
"@type": "Organization", | |
"name": "Outlyer" | |
} | |
} | |
</script> | |
{% if not is_listing_view %} | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "BlogPosting", | |
"headline": "{{ page_meta.name }}", | |
"description": "{{ content.meta_description }}", | |
"url": "{{ page_meta.canonical_url }}", | |
"datePublished": "{{ content.publish_date|datetimeformat('%Y-%m-%d') }}", | |
"dateUpdated": "{{ content.updated|datetimeformat('%Y-%m-%d') }}", | |
{% if content.featured_image %} | |
"image": "{{ content.featured_image }}", | |
{% endif %} | |
"publisher": { | |
"@type": "Organization", | |
"name": "Outlyer" | |
}, | |
{% if content.blog_post_author %} | |
"author": { | |
"@type": "Person", | |
"name": "{{ content.blog_post_author.display_name }}", | |
"url": "{{ group.absolute_url }}/author/{{ content.blog_post_author.slug }}" | |
} | |
{% endif %} | |
} | |
</script> | |
{% endif %} |
Thanks - I just updated it.
I tried to implement the code in our Hubspot Blog and it seems to work so far. The only thing I don't understand is why the testing-tool from Google somehow shows 3 articles.
Did someone else have the same "problem"? Could it have a negative impact?
I'm totally new to schema and appreciate any help!
I tried to implement the code in our Hubspot Blog and it seems to work so far. The only thing I don't understand is why the testing-tool from Google somehow shows 3 articles.
@Joel-Vomsi
Can you provide the URL that this is set up on? I can take a quick look and see if I can determine what is going on!
Can you provide the URL that this is set up on? I can take a quick look and see if I can determine what is going on!
@NickDeckerDevs
Sure, it's on this blog: https://blog.linguista.ch/
The exact article I tested it on is this one: https://blog.linguista.ch/wie-du-auf-einer-sprachreise-nach-kanada-sparen-kannst
@Joel-Vomsi Place this script at the bottom of the template. It looks like it is loading three versions of this.
- once in the (just after google tag manager is implemented)
- once inside a raw html item inside the header container
- once inside the footer in a raw jinja
Once you get that updated let me know and I'll take another look.
@NickDeckerDevs
Thank you very much. As far as I can rate it, it looks good now! It shows up only one time just as it should.
Thank you very much. As far as I can rate it, it looks good now! It shows up only one time just as it should.
@Joel-Vomsi that is awesome, glad this is resolved
line 45 you have
{{% endif %}}
and it should be{% endif %}
EDIT: thanks for this. I couldn't find one in my gists and needed to do this quickly