1

I would like to use the post content in JSON-LD in my Blogger template.

I have the following JSON-LD code so far, which is errorfree, at least when I use the tool https://search.google.com/structured-data/testing-tool:

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "author": {
    "@type": "Person",
    "name": "Billy Bathgate"
  },
  "image": {
    "@type": "ImageObject",
    "thumbnail": "thumbnail",
    "height": "100px",
    "url": "<data:post.thumbnailUrl/>",
    "width": "100px"
  },
  "publisher": {
    "@type": "Organization",
    "name": "My Blogspot Blog",
    "logo": {
      "@type": "ImageObject",
     "url": "https://4.bp.blogspot.com/-G8FrqwN9Wl4/WD2Xz7xBKII/AAAAAAAAAD0/mjrZlZrDy1daudafdegai3LKxxVfaACPcB/s320/dfare-adfte-SaP-de-90dpi.png",
      "width": 320,
      "height": 53
    }
  },
  "keywords": "<data:post.labels/>",
  "headline": "<data:view.title/>",
  "dateModified": "<data:post.lastUpdatedISO8601/>",
  "datePublished": "<data:post.timestampISO8601/>",
  "description": "<data:post.longSnippet/>",
  "mainEntityOfPage": "<data:blog.homepageUrl/>"
}

So, how would I add the post content to JSON-LD? I've looked at http://jsonld.com/blog-post/, but

"articleBody":"<data:post.body/>" 

will not be accepted.

Pmel
  • 83
  • 8
  • In the new themes released by Blogger (Refer to https://blogger.googleblog.com/2017/03/share-your-unique-style-with-new.html ), they have included a tag for automatically generating the JSON-LD data of a post. The tag is `` and only works inside the Blog widget. It contains the basic data but doesn't contain the articleBody attribute. – Prayag Verma Mar 22 '17 at 10:58
  • 1
    Good to know. Thanks! – Pmel Mar 23 '17 at 14:32

2 Answers2

1

What you're looking for is <data:post.body.jsEscaped/> or <data:post.body.jsonEscaped/> - similar to .cssEscaped which was a new find for me with the new templates. Lucky guess, but that's we're left to rely on without proper documentation for Blogger templating.

raccoon
  • 33
  • 1
  • 2
  • 5
0

you can pass validation by using "articleBody":"<data:post.body.jsonEscaped/>" but im not using it since its too long. i also found documentation on Make Valid Blog Posting ldJson on Blogger

Blak RUSH
  • 9
  • 1
  • 5