我应该使用哪些微博数据进行博客?

博客基本上是一个页面,列出了10篇文章的摘要,每个项目标题链接到整个文章页面。

我见过:

  • http://schema.org/Blog
  • http://schema.org/Article (或者http://schema.org/BlogPosting ?)

我在哪里使用这些?

现在在个人文章页面我有:

<article itemscope itemtype="http://schema.org/Article"> <h1 itemprop="name"> <a href="..."> A title... </a> </h1> <div itemprop="articleBody"> bla bla </div> ... </article> 

没关系,我猜,但我在文章索引页面上做了什么? 我是否将这些添加到每篇文章,并将itemscope itemtype="http://schema.org/Blog" itemprop="blogPosts"到所有文章的容器元素? 因为在文档中不会出现文章是博客的孩子…

我同意别人的看法,这个话题非常模糊。 不要越less,我会试图expression我对这个问题的想法,告诉你我是如何在我的博客上做的。

我在同一个文档中使用WebPage和Blog项目types来标记不同的东西。

网页

我在body标签上使用WebPage项目types。 通过这样做,我可以标记我的面包屑。

 <body itemscope itemtype="http://schema.org/WebPage"> <ul itemprop="breadcrumb"> <li> <a href="foo">foo</a> </li> <li> <a href="foo/bar">bar</a> </li> <li> <a href="foo/bar/baz">baz</a> </li> </ul> ... </body> 

博客postes

当我循环博客文章时,我使用包含所有博客文章的包装器上的博客项目types。 我用财产blogPostes标记每一篇文章,当然也使用BlogPosting作为项目types。

 <section itemscope itemtype="http://schema.org/Blog"> <article itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting"> ... </article> <article itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting"> ... </article> ... </section> 

文章页面

请参阅下面的编辑以更新此意见

在文章着陆页上我使用博客项目types。 但是我把post标记为BlogPosting项目。

 <article itemscope itemtype="http://schema.org/BlogPosting"> ... </article> 

我可以看到,你想要标记一个博客项目types的唯一原因是因为blogPostes属性和事实说这是一个博客。 我认为你完成说,这是一个博客标记为博客博客文章。 我也不认为在这种情况下使用这个属性是正确的,因为这是以复数forms使用的。 对我来说,这反映了不同的使用领域。


编辑

我不确定模式是否已经扩展,或者如果我第一次错过它,但Blog项目现在有一个名为blogPost的属性,那就是单数formsblogPosts 。 那么我会说,将主要元素标记为Blog项目并使用blogPost属性作为文章并将其标记为BlogPosting项目更有意义

我将使用http://schema.org/WebPage作为你的所有页面,因为这允许你定义诸如Breadcrumbs / navigation之类的东西,这对描述一个站点而言是重要的,而不pipe特定的内容。

在微观数据模式中仍然需要大量的工作,你已经指出了什么似乎是一个缺口 – 文章和我可以看到的任何其他东西之间没有父/子关系(例如'Articleindex'或'Articles “)。

我没有真正阅读任何表明这个父子层次是超级重要的东西,除非父母正在扩展重要的传达属性,所以我认为你可以逃脱。

但是,您没有提到“文章”是什么types的内容。 如果他们更新闻或官方性质(如新闻文章,研究论文等),我会为每篇文章使用http://schema.org/Article ,而不用担心文章索引页面。 否则,请使用http://schema.org/Blog http://schema.org/BlogPosting。;

文章和博客模式描述现在非常模糊,将来可能会有所变化,但是我相信博客模式更适合博客(甚至在下面的文章模式描述页面中暗示) ,在“ More specific types ”下)。

所以,你可以从更高层次的模式定义你的主博客页面开始:

 <!DOCTYPE html itemscope itemtype="http://schema.org/Blog"> <meta itemprop="creator" content="Creator of the blog"> <meta itemprop="name" content="Title of your Blog"> <meta itemprop="description" content="Description of your blog"> <meta itemprop="image" content="http://www.yourblog.com/main/image/pic.gif"> 

您可以使用二级博客模式BlogPosting来定义您的博客页面,并定义相应的项目属性,如下所示:

 <!DOCTYPE html itemscope itemtype="http://schema.org/BlogPosting"> <meta itemprop="author" content="Author of your blog"> <meta itemprop="name" content="Title of your content"> <meta itemprop="description" content="Description of your post"> <meta itemprop="image" content="http://www.yourblog.com/post/image/pic.gif"> 

呃,很复杂:P,你可以雇用一百万个房产,但只关注最重要的房产。

哎呀! 这段代码是错误的!

 <!DOCTYPE html itemscope itemtype="http://schema.org/Blog"> 

你应该使用这个代码:

 <!DOCTYPE html> 

代替:

 <!DOCTYPE html itemscope itemtype="http://schema.org/Blog"> 

当我们声明博客的types时,我们可以将它添加到body标签中:

 <body itemscope='' itemtype='http://schema.org/Blog'> 

在本节内部,我们可以使用“Itemprop”作为itemtype的属性。
我们正在谈论网站的types,而不是网站的基本语言。

这里有其他重要的项目使用范围

人的例子

 <div itemscope itemtype="http://schema.org/Person"> <span itemprop="name">Mahdi Maghrooni</span> <img src="http://maghrooni.ir/img/users/FCwNdpWQKGQqiZphN6rj2YuHY3bXrF.jpg" itemprop="image" alt="Maghrooni" /> </div>