LD-JSON Script Schema.org
BlogPosting For Blogger - Schema.org for structured data a web page one of
which can be written with the ld-json script which is simpler and easier to
write and understand.
Valid and appropriate
structured data is important for SEO. Because there are many types of
structured data, it makes bloggers like me confused to determine the right
structured data for this type of blog.
Though it's quite easy to
determine the right schema.org for blogs, BlogPosting . But because not many
people wrote about how to apply it to blogspot, so this became difficult.
If you use the default
blogger theme, you don't need to bother thinking about how to implement
BlogPosting schema.org because it's been written automatically through blogger
server. You can find it with the code <b:include data='post' name='postMetadataJSON'/> but
you will not find the details of the ld-json code.
If you use a custom blogger
theme and have used schema.org structured data, try checking what schema.org is
being used.
If it turns out that
schema.org is not a BlogPosting type, you can try to change it and use the
BlogPosting schema.org written with the following ld-json script.
To get started, please
delete all code related to schema.org before except for Breadcrumb.
The codes are usually like
itemprop , itemscope , or itemtype . Then delete the hentry code in this code
or code like this <article class='post hentry'>
And please save the
following code under the <article class='post'> code ( the hentry code has
been deleted ).
<b:if cond='data:blog.pageType == "item" or data:blog.pageType == "static_page"'>
<script type='application/ld+json'>{
"@context": "http://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "<data:post.canonicalUrl/>"
},
"headline": "<data:view.title.escaped/>",
<b:if cond='data:blog.metaDescription'>"description": "<data:blog.metaDescription.escaped/>",<b:else/>"description": "Please visit the post <data:view.title.escaped/> to read the full article by clicking the link above.",</b:if>
"datePublished": "<data:post.timestampISO8601/>",
"dateModified": "<data:post.lastUpdatedISO8601/>",
"image": {
"@type": "ImageObject",<b:if cond='data:post.firstImageUrl'>"url": "<b:eval expr='resizeImage(data:post.firstImageUrl,1280,"1280:720")'/>",<b:else/>"url": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjQo7KZtDOezNH9stpl_FBVS3N0-XDGTSmz8RR1Bz7WMpKf33X4PwIrP5I-Wf5_hqk-AtDh61twK8sZzWITCSGyNAWnXgvHH9VyAjskpUsawLhl2AkTjqKJQS7EAIjFBKE8ulO4Urx0CI/s1280/no-thumbnail.jpg",</b:if>
"height": 720,
"width": 1280
},
"publisher": {
"@type": "Organization",
"name": "<data:blog.title/>",
"logo": {
"@type": "ImageObject",
"url": "https://2.bp.blogspot.com/-hnYX9pmKEyM/WvI_f6OwMDI/AAAAAAAAxgI/HXiAtblHykMHBLvOEK1BWCGDMGVR6GG4cBGAs/s600/logoka.png",
"width": 600,
"height": 60
}
},
"author": {
"@type": "Person",
"name": "<data:post.author/>"
}
}
</script>
</b:if>
The image URL marked is the blog logo with a size of 600x60, replace it with your own logo. .
This post is part of a way
to deal with warnings in the search console for Indexed issues , even though it
was blocked by robots.txt which I divided into 3 posts. So also see the next
post after this.