Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preferred approach for marking up a blog with Schema.org

Background/context

As schema.org is relatively new, perhaps this question will promote more discussion than a definitive answer. Either way, hopefully some learning from others' application/experience can be gained.

Having studied the http://schema.org documentation pages – and whilst there seems to be an extensive array of properties (read: itemprop attributes) available to enrich a blog post, there seems to be some inconsistencies and 'grey areas' with regard to the best approach to mark up blog comments. Let me provide an example:

The schema.org documentation for blogs can be found on within Thing > CreativeWork > Blog and for reference, a blog post lives within Thing > CreativeWork > Article > BlogPosting

So far, the documentation and markup examples on the aforementioned pages provide enough reference to format a blog index page, and the bulk of content within an individual post (author, pubDate, articleBody, interactionCount, etc.)

The problem: applying the UserInteraction schema to individual blog comments

It is when we start to look at individual UserInteraction elements (blog comments) within the interactionCount that things get a little vague. The documentation leads us through to Thing > Event > UserInteraction > UserComments, and is described as 'User interaction: A comment about an item.' However all of the suggested properties of UserInteraction are geared towards a physical event.

The only property that appears to be relevant to a blog comment in this schema's documentation is description; which could be used for the comment body. What feels lacking is some specific context for user comments about a blog post. There's also no evidence of example markup for said comments, even a search for 'comments' on the site doesn't seem to yield any clarity.

Has anyone marked up their blog using schema.org – and how did you approach/solve this?

I'll also raise this matter via the schema.org feedback form and update this post if anything comes to light.

like image 245
Martin Avatar asked Jul 01 '11 14:07

Martin


People also ask

What is schema in blogging?

Just to recap, article schema markup is a piece of code that sits behind blog posts and news articles that gives search engines more information about the content on the page.

What is schema markup?

Schema markup, found at Schema.org, is a form of microdata. Once added to a webpage, schema markup creates an enhanced description (commonly known as a rich snippet), which appears in search results.

How does schema markup help?

Schema markup (schema.org) is a structured data vocabulary that helps search engines better understand the info on your website in order to serve rich results. These markups allow search engines to see the meaning and relationships behind entities mentioned on your site.


1 Answers

Have a look at the examples here http://schema.org/WebPage and notice how the reviews are used for the Books.

You can do the same for Comments in Article, here's an example:

 <div itemscope itemtype="http://schema.org/Article"> 

     <-- Article content -->

     <div itemprop="comment" itemscope itemtype="http://schema.org/UserComments">     
       <meta itemprop="discusses" content="A masterpiece of literature" />             
       <span itemprop="creator">John Doe</span>   
       <time itemprop="commentTime" datetime="2011-05-08T19:30">May 8, 7:30pm</time>    

       <span itemprop="commentText">I really enjoyed this book. It captures the essential  
       challenge people face as they try make sense of their lives.</span>    
     </div>

     <div itemprop="comment" itemscope itemtype="http://schema.org/UserComments">     
       <meta itemprop="discusses" content="A masterpiece of literature" />             
       <span itemprop="creator">John Doe</span>   
       <time itemprop="commentTime" datetime="2011-05-08T19:30">May 8, 7:30pm</time>    

       <span itemprop="commentText">I really enjoyed this book. It captures the essential  
       challenge people face as they try make sense of their lives.</span>    
     </div>

 </div>
like image 51
Ervald Avatar answered Sep 21 '22 17:09

Ervald